Because who needs documentation when you have AI?
anyapi_screencap.webm.mp4
AnyAPI is a revolutionary tool that turns "I wish I had an API for that" into "I totally have an API for that!" It's basically an API hallucination machine - just point it at any endpoint you wish existed, and watch as GPT pretends it's been there all along!
- Clone this repository (or just copy-paste the code, we won't judge)
- Install requirements:
pip install bottle openai - Set your OpenAI API key (or use mine, just kidding, please don't)
- Run the application:
python app.py - Point your requests at
http://localhost:8080/whatever/you/wantand marvel at the responses!
- You send a request to a completely made-up endpoint
- We forward your gibberish to GPT
- GPT makes up a reasonable-sounding response
- You pretend this is a real API
- Everyone is happy!
GET /weather/forecast?location=timbuktu
Response:
{
"location": "Timbuktu",
"forecast": "Sunny",
"temperature": "32°C"
}GET /stocks/price?symbol=MOON
Response:
{
"symbol": "MOON",
"price": 42.50
}*Not actually financial advice
POST /advice/life?problem=existential_crisis
Response:
{
"advice": "Embrace the uncertainty and explore new perspectives to find meaning in your existence."
}GET /excuses/generate?get_out_of=meeting&humor=high
Response:
{
"excuse": "I have a sudden urge to break into an interpretive dance routine, can we reschedule this meeting?"
}This API will make up responses to anything you ask. Please do not use this!
Why would you want to contribute to this? But if you insist, pull requests are welcome, especially if they add more humor or unnecessary complexity.
Remember: The best API is the one you don't have to build yourself!