gpt-image-2 api for free
Free OpenAI-compatible API - 50+ active models, zero billing
Also searched as Free The AI, Free The Ai, and FreeTheAI.
Chat · Streaming · Tool Calling · Image Generation · Image Editing
Website · Quickstart · Setup Guides · Docs · Model Catalog · Pricing · Status · API Health · Discord · Support
Roleplay API | Coding Agent API | OpenAI-Compatible API | What Is Free The AI
FreeTheAi, also searched as Free The AI or Free The Ai, is a free API gateway with 50+ active models behind a single key. OpenAI-compatible - if your SDK works with OpenAI, it works here. Full request docs live at freetheai.xyz/docs.
POST /v1/chat/completions— chat with streaming and tool callingPOST /v1/messages— Anthropic-style messages routePOST /v1/responses— OpenAI Responses APIPOST /v1/images/generations— image generationPOST /v1/images/edits— image editing with prompt + base64 input- Tool calling, structured outputs, multi-turn conversations
- No billing, no credit card, no prompt storage
- Optional paid slots at freetheai.xyz/pricing for separate higher-power models
Base URL https://api.freetheai.xyz/v1
Auth Bearer YOUR_API_KEY
|
1 - Join Discord Open discord.gg/secrets |
2 - Get a key Run |
|
3 - Check in Run |
4 - Build Point any OpenAI SDK at the base URL |
Important
New keys must complete /checkin once per UTC day before API use. /checkin asks for your existing key and a randomized human challenge.
Tip
Lost your key? Run /resetkey and provide a real reset reason - same account, same stats, fresh key.
Step-by-step setup for the most common AI clients lives at freetheai.xyz/setup.
| Category | Clients |
|---|---|
| Coding agents | OpenCode, Kilo Code, Zed, Cline, Roo Code, Continue.dev |
| CLI | Aider, Claude Code |
| Roleplay & chat | SillyTavern, Janitor AI, Chub AI, RisuAI |
| General chat clients | LibreChat, Open WebUI, LobeChat, AnythingLLM, Cherry Studio, TypingMind, BoltAI, Page Assist, Chatbox, Big-AGI |
Each guide ships exact field labels, a copy-paste config, and the gotchas users actually hit.
This repo includes a SKILL.md describing how AI agents should connect to FreeTheAi (base URL, routes, model aliases, capability metadata, and rate limits). The standalone skeuomorphic UI skill that previously lived here is now at docs/SKILL_SKEUOMORPHIC.md.
| Route | Method | What it does |
|---|---|---|
/v1/chat/completions |
POST |
Chat completions with streaming |
/v1/messages |
POST |
Anthropic-style messages |
/v1/responses |
POST |
OpenAI Responses API |
/v1/images/generations |
POST |
Image generation |
/v1/images/edits |
POST |
Image editing |
/v1/models |
GET |
Authenticated model catalog |
/v1/models/full |
GET |
Expanded model catalog with throughput policy metadata |
/v1/models/leaderboard |
GET |
Site-key top model leaderboard |
/v1/health |
GET |
Health check |
Chat — curl
curl https://api.freetheai.xyz/v1/chat/completions \
-H "Authorization: Bearer $FREETHEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bbg/moonshotai/Kimi-K2.5",
"messages": [
{ "role": "user", "content": "Write a Python hello world." }
],
"stream": true
}'Chat — JavaScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.FREETHEAI_API_KEY,
baseURL: "https://api.freetheai.xyz/v1",
});
const res = await client.chat.completions.create({
model: "bbg/moonshotai/Kimi-K2.5",
messages: [{ role: "user", content: "Say hello." }],
});
console.log(res.choices[0].message.content);Chat — Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.freetheai.xyz/v1",
)
res = client.chat.completions.create(
model="bbg/moonshotai/Kimi-K2.5",
messages=[{"role": "user", "content": "Say hello."}],
)
print(res.choices[0].message.content)Messages API — curl
curl https://api.freetheai.xyz/v1/messages \
-H "Authorization: Bearer $FREETHEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bbg/moonshotai/Kimi-K2.5",
"max_tokens": 256,
"messages": [
{ "role": "user", "content": "Write a migration plan." }
]
}'Tool calling — Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.freetheai.xyz/v1",
)
res = client.chat.completions.create(
model="wsf/swe-1.6",
tool_choice="required",
messages=[{"role": "user", "content": "Get weather for Boston."}],
tools=[{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the weather for a city.",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
"additionalProperties": False,
},
},
}],
)
print(res.choices[0].message.tool_calls)Image generation — curl
curl https://api.freetheai.xyz/v1/images/generations \
-H "Authorization: Bearer $FREETHEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "img/gpt-image-2",
"prompt": "A neon sports car under rainy city lights"
}'The free API exposes img/gpt-image-2 for both generation and editing. Live availability and any future image models are in GET /v1/models.
Robust clients should support both response shapes:
data[0].b64_jsonfor base64 image datadata[0].urlfor a generated image URL
Image editing — Python
import base64, requests, os
def edit_image(prompt, image_path):
with open(image_path, "rb") as f:
data_url = "data:image/png;base64," + \
base64.b64encode(f.read()).decode()
return requests.post(
"https://api.freetheai.xyz/v1/images/edits",
headers={
"Authorization": f"Bearer {os.environ['FREETHEAI_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "img/gpt-image-2",
"prompt": prompt,
"image": data_url,
},
).json()See examples/image_client.py for a beginner-friendly CLI tool that saves the key locally and handles both b64_json and url image responses.
Public releases make updates easier to follow and help the repo look active to GitHub users.
- Latest release draft notes:
RELEASE_NOTES.md - Public changelog:
CHANGELOG.md - SEO and GitHub growth checklist:
docs/GROWTH.md
If this project helps you, star the repo and share the docs page. It helps more developers find a free OpenAI-compatible API without a billing setup.
FreeTheAi is built and maintained by Vibhek Soni. The free tier always stays free. If this project saves you a subscription, replaces a paid plan, or unblocks something you were stuck on, a small tip helps cover servers, proxies, and the long nights spent keeping models alive.
- One-time tip on Buy Me a Coffee:
buymeacoffee.com/vibheksoni - Star the repo:
github.com/Free-The-Ai/free-ai - Share the docs and the setup guides with anyone you know who needs a free OpenAI-compatible key
Thanks for keeping the free tier alive.
Browse the full searchable catalog at freetheai.xyz/models. Request examples and endpoint details are on freetheai.xyz/docs.
| Prefix | What it is |
|---|---|
kai/* |
Aggregated models |
bbg/* |
Premium allowlist |
bbl/* |
Chat models |
cwy/* |
Chat models |
glm/* |
Chat models |
opc/* |
Free models |
wsf/* |
Chat models |
img/* |
Image generation and editing |
Note
Use exact alias IDs from GET /v1/models. Model availability updates automatically as the service catalog changes.
| Tier | RPM | Concurrency |
|---|---|---|
| 1 | 10 | 1 |
| 2 | 15 | 1 |
| 3 | 20 | 2 |
| 4 | 28 | 2 |
| 5 | 35 | 3 |
Tiers unlock through Discord invite progress. Per-user daily success cap defaults to 250/day (resets at UTC midnight) with role-based bumps for trusted members.
FreeTheAi does not store prompt text, completion text, uploaded media, or conversation history as operational logs.
|
Tracked
|
Not tracked
|
See the public Privacy Policy and Terms of Use for the plain-English disclosure. Metadata is logged to validate access, debug failures, secure the service, enforce limits, and prevent abuse.
|
|
Built by a small crew sharing free AI tools with everyone. Open source on GitHub.
| Member | Role | GitHub | |
|---|---|---|---|
| Vibhek Soni | Founder. Wrote the full API and most of the platform. | @vibheksoni | |
| Dr. Vova | Frontend and the upcoming GoonPia roleplay site. | @drvova | |
| Dysekt | Discord ops and community. | @DysektAI | |
| Sai Revanth | Discord manager. Day-to-day moderation and onboarding. | @svsairevanth |
GitHub org: Free-The-Ai. Full team page: freetheai.xyz/team.
Website · Quickstart · Docs · Model Catalog · Pricing · Status · Team · Discord · Backup Invite · Support
Free tier stays free. Optional paid slots are available for higher-power models.