Skip to content
View as Markdown

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.

FormatPathUsed by
Chat CompletionsPOST /v1/chat/completionsMost apps, the OpenAI SDKs, LangChain
ResponsesPOST /v1/responsesCodex CLI and newer OpenAI SDK code
Anthropic MessagesPOST /v1/messagesClaude Code and the Anthropic SDK
ModelsGET /v1/modelsApps that show a model picker
Search and AnswerPOST /v1/search, POST /v1/answerWeb 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.

ClientType thisRequests go to
OpenAI SDKs and most apps ("base URL", "API base", "endpoint")https://api.freetheai.org/v1https://api.freetheai.org/v1/chat/completions
Apps that want the full address (JanitorAI, TypingMind)https://api.freetheai.org/v1/chat/completionsthe same
Anthropic SDK and Claude Codehttps://api.freetheai.orghttps://api.freetheai.org/v1/messages
Apps that add /v1 themselves (Cherry Studio)https://api.freetheai.orghttps://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.org and use an fta/ model ID. Features that only exist in Claude models may not work on other models.
  • Using the Responses API or Codex? Keep it. /v1/responses works 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:

http
Authorization: Bearer ftai_your_key_here

x-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.

FreeTheAI documentation. Paid models and plans are coming soon; the free tier has daily limits.