A simple and free web service for interacting with ChatGPT
Built with ❤️ using Python
Read this in Farsi / فارسی
- Free to use, no authentication required
- Lightweight and fast
- Easy to deploy
- Written in pure Python
flask– Web frameworkrequests– For making HTTP requestsjson– Built-in JSON handlingrandom– Built-in random utilities
If you experience request limits by the upstream service:
- Change your proxies
- Or add multiple proxy options in your setup
Using rotating proxies is recommended for stability in heavy use cases.
bash <(curl -Ls https://raw.githubusercontent.com/iliya-Developer/Api-ChatGPT/main/install.sh)
Make sure you have Python 3.09+ installed.
POST /chat
Request Body:
json
{
"user_id": 1,
"message": "Hi, how are you?"
}
python
import requests
url = "http://localhost:5000/chat"
data = {
"user_id": 1,
"message": "Hi, how are you?"
}
response = requests.post(url, json=data)
print(response.json())
bash
curl -X POST http://localhost:5000/chat \
-H "Content-Type: application/json" \
-d '{"user_id": 1, "message": "Hi, how are you?"}'