Skip to content

amirparsadd/facts-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facts API

This is a very simple API i made that generates a random fact using AI and returns it to the user.

A Free version of this API is available HERE (currently not recommended for prod use)

How To Use

Getting A Fact

You can get a fact by sending a GET request to /

There are also a few search params you can use:

  • topic: Use this to select a topic (example: Sports)
  • language: Use this to select a language (example: spanish)

List Languages

You can get a list of languages by sending a GET request to /languages

List Topics

You can get a list of topics by sending a GET request to /topics

How To Deploy

To deploy this app, you need an ArvanCloud Account and an AvalAI Developer Account.

  1. Clone this repo and run npm install
  2. Setup R1EC and login
  3. Create a .env file and fill it according to .env.example
  4. Run npm run deploy
  5. Enjoy!

Contributing

All PRs, Issues and Feat recommendations are welcome! Just send it and wait for review.

Donations

Using your donations, i will scale the free version of this API and improve it! You can send your donations here (iran):

About

An AI-powered Fun Fact API optimized for the Edge!

Topics

Resources

License

Stars

Watchers

Forks