---
url: https://docs.freetheai.org/concepts/endpoints.md
description: >-
  FreeTheAI answers OpenAI Chat Completions, OpenAI Responses, and Anthropic
  Messages. Which base URL each client needs, and which endpoint to pick.
---

# 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](/api/chat-completions) | `POST /v1/chat/completions` | Most apps, the OpenAI SDKs, LangChain |
| [Responses](/api/responses) | `POST /v1/responses` | Codex CLI and newer OpenAI SDK code |
| [Anthropic Messages](/api/messages) | `POST /v1/messages` | Claude Code and the Anthropic SDK |
| [Models](/api/models) | `GET /v1/models` | Apps that show a model picker |
| [Search](/api/search) and [Answer](/api/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` |

::: warning 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](/guides/) 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](/getting-started/account).

## Request size

A request body can be up to **8 MB**, images included. Larger bodies answer `413` with `request body is too large`.
