FreeTheAi offers a free API gateway that provides access to more than 16,000 AI models through a single OpenAI-compatible endpoint. Hosted at api.freetheai.xyz, it supports chat completions, image generation, tool calling, and other features without any billing, daily limits, or prompt storage. The project originates from a GitHub repository by vibheksoni (vibheksoni/free-ai), built in Astro with 403 stars, and includes a website at freetheai.xyz for documentation and model browsing.
This setup routes requests to various backend providers while presenting a unified interface. Developers can use existing OpenAI SDKs by changing the base URL, avoiding the need to manage multiple API keys or switch providers. Full documentation appears at freetheai.xyz/docs, including an API health check at api.freetheai.xyz/v1/health.
Core features
The API mimics OpenAI's structure closely:
- Chat completions via POST /v1/chat/completions, with streaming support and tool calling for multi-turn conversations.
- Image handling through POST /v1/images/generations for prompt-based creation and POST /v1/images/edits for modifying base64-encoded images.
- Model catalog accessible via GET /v1/models (authenticated list) or GET /v1/models/full (with throughput details); a leaderboard sits at /v1/models/leaderboard.
- Anthropic compatibility with POST /v1/messages for message-style routing.
- Zero costs and privacy: no billing, no stored prompts, keys obtained via Discord.
Badges on the README highlight 16,248 models, $0 cost, and Discord signup at discord.gg/secrets.
Getting started
FreeTheAi requires no local installation—it's a remote service. Access starts with a free API key from Discord.
- Join the Discord server at discord.gg/secrets.
- Type
/signupin any channel to generate a key (format: sk-...). - Set the key as an environment variable:
export FREETHEAI_API_KEY="sk-...". - Use it with OpenAI-compatible clients, pointing to base URL https://api.freetheai.xyz/v1 and Authorization: Bearer $FREETHEAI_API_KEY.
Lost keys regenerate via /resetkey, preserving account stats.
Here is a curl example for chat:
curl https://api.freetheai.xyz/v1/chat/completions \
-H "Authorization: Bearer $FREETHEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "yng/gemini-3-1-pro",
"messages": [
{ "role": "user", "content": "Write a Python hello world." }
],
"stream": true
}'
JavaScript with the OpenAI library:
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: "yng/gemini-3-1-pro",
messages: [{ role: "user", content: "Say hello." }],
});
console.log(res.choices[0].message.content);
Python version:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.freetheai.xyz/v1",
)
res = client.chat.completions.create(
model="yng/gemini-3-1-pro",
messages=[{"role": "user", "content": "Say hello."}],
)
print(res.choices[0].message.content)
Endpoints include health checks and model lists, all under /v1. Authentication applies to most routes.
Available endpoints
| Route | Method | Purpose |
|---|---|---|
| /v1/chat/completions | POST | Chat with streaming |
| /v1/messages | POST | Anthropic-style messages |
| /v1/images/generations | POST | Image generation |
| /v1/images/edits | POST | Image editing (base64 input) |
| /v1/models | GET | Model list |
| /v1/models/full | GET | Detailed model info |
| /v1/models/leaderboard | GET | Top models by site key |
| /v1/health | GET | Service status |
Structured outputs and multi-turn support work across chat routes.
Who this is for
FreeTheAi suits developers prototyping AI features, testing models, or building apps without upfront costs. It works for scripting quick experiments—like generating Python code snippets or images—using familiar SDKs in JavaScript or Python. Hobbyists and students can experiment with 16,000+ models, including ones like yng/gemini-3-1-pro, via a simple Discord signup.
Use cases include integrating AI into web apps, Discord bots, or CLI tools where OpenAI SDKs drop in directly. The lack of prompt storage appeals to users handling sensitive data, as requests pass through without logging.
How it compares
Paid services like official OpenAI charge per token and enforce rate limits, while FreeTheAi claims no caps or billing—though real-world throughput depends on backend providers, visible in /v1/models/full metadata. Other free proxies exist, but few match this model's count or OpenAI/Anthropic compatibility in one key.
Self-hosted options like Ollama or LocalAI require hardware for model inference, trading convenience for control; FreeTheAi offloads that entirely. It's lighter on setup than juggling multiple free tiers from Hugging Face or Grok, but relies on a third-party Discord-managed service.
Model exploration
The catalog at freetheai.xyz/models lists options with badges for availability. Leaderboards rank by community usage per site key. Examples include Gemini variants and others prefixed like "yng/", suggesting aggregator naming.
FreeTheAi skips self-hosting entirely—users interact via API only, with the Astro-based site handling docs and Discord integration. Production apps needing SLAs or custom models might look elsewhere, as this targets casual to moderate use. Source code lives at https://github.com/vibheksoni/free-ai; check freetheai.xyz for updates.
Comments