Claude Code
Claude Code can run on FreeTheAI's Anthropic-compatible Messages endpoint. Point ANTHROPIC_BASE_URL at FreeTheAI and choose which model fills each Claude slot.
Category: Coding tools. Before you start, you need a FreeTheAI account, an API key, and today's check-in.
Settings
| Setting | Value |
|---|---|
| ANTHROPIC_BASE_URL | https://api.freetheai.org |
| ANTHROPIC_AUTH_TOKEN | Your FreeTheAI key (ftai_..., 53 characters) |
| ANTHROPIC_MODEL | fta/zai/glm-5.3 |
Steps
Add the settings
Put this in ~/.claude/settings.json (on Windows, %USERPROFILE%\.claude\settings.json). Never put your key in a project's shared .claude/settings.json.
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.freetheai.org",
"ANTHROPIC_AUTH_TOKEN": "ftai_your_key_here",
"ANTHROPIC_MODEL": "fta/zai/glm-5.3",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "fta/zai/glm-5.3",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "fta/zai/glm-5.3",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "fta/zai/glm-5.3-flash",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}Start Claude Code
Run claude, then /status. The Anthropic base URL line should show api.freetheai.org.
Check in daily
Free models need one check-in a day at freetheai.org/checkin, or requests are refused.
Tips
- Claude Code warns that fta/ models are not in its model catalog. That is expected; it still works and assumes a 200K context.
- The HAIKU model runs background tasks such as titles, so a fast model fits there.
- If a model answers 400 about unknown fields, add "
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1".
Common questions
Is using Claude Code with FreeTheAI official?
No. Claude Code supports custom gateways through ANTHROPIC_BASE_URL, but Anthropic does not support non-Claude models behind one, so some Claude-only features may not work.
Does Claude Code tool use work on FreeTheAI?
Yes. File reading and other tools were tested on 2026-09-29 with fta/zai/glm-5.3 and fta/kimi/k3.
Does it use my Claude subscription?
No. While ANTHROPIC_AUTH_TOKEN is set, requests go to FreeTheAI with your FreeTheAI key and do not count against a claude.ai plan.
More help
How this guide was checked
Tested end to end with Claude Code 2.1.284 on 2026-09-29 (reads a file with its Read tool on three FreeTheAI models).

