Use Claude Code With Free Models: GLM 5.3, Kimi K3, and MiniMax M3

By Updated 2 min read

Quick answer

Put ANTHROPIC_BASE_URL=https://api.freetheai.org, your FreeTheAI key as ANTHROPIC_AUTH_TOKEN, and a model such as fta/zai/glm-5.3 in ~/.claude/settings.json, then start claude. Claude Code then runs on free models, tools included.

Key takeaways

  • Claude Code works with any Anthropic-compatible gateway through ANTHROPIC_BASE_URL.
  • FreeTheAI serves the Anthropic Messages API for every free model, with tool calls.
  • Put a strong model in the main slots and a fast one in the Haiku slot.
  • Tested end to end on 2026-09-29: Claude Code read files with its tools on GLM 5.3 and Kimi K3.

How it works

Claude Code sends its requests in Anthropic's Messages format to whatever address ANTHROPIC_BASE_URL names. FreeTheAI answers that format for every free model and translates it to the model behind it, streaming and tool calls included. So Claude Code keeps working the same way while the thinking is done by GLM, Kimi, or MiniMax.

This is not an official Anthropic setup. Features that only exist in Claude models (for example some extended thinking modes) may not work.

Setup

Get a key from Dashboard > API keys and do today's check-in. Then put this in ~/.claude/settings.json (on Windows %USERPROFILE%\.claude\settings.json):

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 and run /status. The Anthropic base URL line should show https://api.freetheai.org. Never put your key in a project's shared .claude/settings.json, which is often committed to git.

Which model goes in which slot

Claude Code model slots on FreeTheAI
SlotSuggested modelWhy
Main (ANTHROPIC_MODEL)fta/zai/glm-5.3Strong at code and tool use, 1M context
Opus / Sonnetfta/zai/glm-5.3 or fta/kimi/k3Kimi K3 reasons longer on hard problems
Haiku (background tasks)fta/zai/glm-5.3-flashA lighter model for titles and small helper calls

Warnings you can ignore, and ones you can fix

  • "Model not in catalog": expected, because fta/ models are not Anthropic models. It still works and assumes a 200K context.
  • 400 about unknown fields: add "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1" to the env block.
  • "Daily check-in required": check in at freetheai.org/checkin.

Other coding agents

The same key works in every other coding agent. Codex CLI uses the Responses API, and Cline, Kilo Code, OpenCode, Continue, Aider, and Zed use the OpenAI format. Each has a tested guide: Codex, Cline, Kilo Code, OpenCode, Aider, and Zed.

Frequently asked questions

Can Claude Code use free models?

Yes. Point ANTHROPIC_BASE_URL at https://api.freetheai.org and use your FreeTheAI key as ANTHROPIC_AUTH_TOKEN. Free models like GLM 5.3 and Kimi K3 then run Claude Code.

Do Claude Code tools work on these models?

Yes. Tool calls (reading files with the Read tool) were tested with fta/zai/glm-5.3 and fta/kimi/k3.

Does this use my Claude subscription?

No. While ANTHROPIC_AUTH_TOKEN is set, requests go to FreeTheAI with your FreeTheAI key.

Which free model is best for coding?

Start with fta/zai/glm-5.3. Use fta/kimi/k3 for harder reasoning and fta/zai/glm-5.3-flash for small, quick tasks.

About the author

founded FreeTheAI and builds and runs its API. He answers the support tickets these posts come from.

Published

All posts

Try the free API

Create a free account, make an API key, and do the daily check-in. No credit card.

Create a free account