Skip to content

Free-The-Ai/free-ai

Repository files navigation

FreeTheAi

TrevorSecretsToAi
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


Models API Cost Prompts Discord


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


Overview

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 calling
  • POST /v1/messages — Anthropic-style messages route
  • POST /v1/responses — OpenAI Responses API
  • POST /v1/images/generations — image generation
  • POST /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

Quick Start

Base URL    https://api.freetheai.xyz/v1
Auth        Bearer YOUR_API_KEY

1 - Join Discord

Open discord.gg/secrets

2 - Get a key

Run /signup and complete the Discord modal

3 - Check in

Run /checkin with your API key once per UTC day

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.


Setup Guides

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.


SKILL.md

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.


Routes

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

Code Examples

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_json for base64 image data
  • data[0].url for 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.


Release And Growth

Public releases make updates easier to follow and help the repo look active to GitHub users.

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.


Support The Project

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.

Buy Me a Coffee

Thanks for keeping the free tier alive.


Models

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.


Rate Limits

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.


Privacy

FreeTheAi does not store prompt text, completion text, uploaded media, or conversation history as operational logs.

Tracked

  • IP address and network/security signals
  • API key prefix and account/user identifiers
  • Discord eligibility, role, and check-in state
  • Model alias used
  • Route, timestamp, latency, and token/request-unit counts
  • Request timestamp
  • Status code
  • Error IDs and rate-limit/concurrency signals

Not tracked

  • Prompt content
  • Completion content
  • Uploaded media as message logs
  • Conversation history

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.


Discord Commands

Command Description
/signup Get your API key after the modal
/checkin Daily key activation challenge
/resetkey Rotate to a fresh key after a reason + challenge
/models Browse models
/stats Your usage stats
/generate Generate an image
Command Description
/tiers View rate limit tiers
/tiermodels Models grouped by provider prefix
/leaderboard Top users
/modelleaderboard Top models
/modelstats Stats for a model

Team

Built by a small crew sharing free AI tools with everyone. Open source on GitHub.

Member Role GitHub
Vibhek Soni Vibhek Soni Founder. Wrote the full API and most of the platform. @vibheksoni
Dr. Vova Dr. Vova Frontend and the upcoming GoonPia roleplay site. @drvova
Dysekt Dysekt Discord ops and community. @DysektAI
Sai Revanth Sai Revanth Discord manager. Day-to-day moderation and onboarding. @svsairevanth

GitHub org: Free-The-Ai. Full team page: freetheai.xyz/team.


Community

Join Discord Free-The-Ai org Buy Me a Coffee

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.