Endpoints and base URLs
FreeTheAI speaks three wire formats. Every free model answers on all three, streamed or not, with tool calls. Pick the one your client or SDK already uses.
| Format | Path | Used by |
|---|---|---|
| Chat Completions | POST /v1/chat/completions | Most apps, the OpenAI SDKs, LangChain |
| Responses | POST /v1/responses | Codex CLI and newer OpenAI SDK code |
| Anthropic Messages | POST /v1/messages | Claude Code and the Anthropic SDK |
| Models | GET /v1/models | Apps that show a model picker |
| Search and Answer | POST /v1/search, POST /v1/answer | Web results and short answers for any model or app |
Which base URL to use
Clients add the path themselves, so what you type depends on the client.
| Client | Type this | Requests go to |
|---|---|---|
| OpenAI SDKs and most apps ("base URL", "API base", "endpoint") | https://api.freetheai.org/v1 | https://api.freetheai.org/v1/chat/completions |
| Apps that want the full address (JanitorAI, TypingMind) | https://api.freetheai.org/v1/chat/completions | the same |
| Anthropic SDK and Claude Code | https://api.freetheai.org | https://api.freetheai.org/v1/messages |
Apps that add /v1 themselves (Cherry Studio) | https://api.freetheai.org | https://api.freetheai.org/v1/chat/completions |
Common mistake
Doubling or dropping /v1 is the most common setup error. If an app reports 404 or "Not Found" on every request, check whether it already adds /v1 or /chat/completions to the address you entered. Each app guide shows the exact value.
Choosing a format
- Starting fresh? Use Chat Completions. Every OpenAI-compatible library and app supports it.
- Using the Anthropic SDK or Claude Code? Keep it. Set the base URL to
https://api.freetheai.organd use anfta/model ID. Features that only exist in Claude models may not work on other models. - Using the Responses API or Codex? Keep it.
/v1/responsesworks for every free model.
The formats are interchangeable for the same model: the same fta/zai/glm-5.3 answers on all three, and your usage counts the same.
Authentication
Every endpoint except GET /v1/health needs your API key:
Authorization: Bearer ftai_your_key_herex-api-key: ftai_... is accepted as well. See Account and API keys.
Request size
A request body can be up to 8 MB, images included. Larger bodies answer 413 with request body is too large.

