Models → Pricing → Docs → Blog → Changelog → Contact → Status →
Get started freeLog in

The Cheapest Way to Run Claude Code on FreeModel

The cheapest way is free: Claude Haiku 5.5 is on the free plan. Opus and Sonnet need a paid plan, and there what you can control is how many plan tokens each session uses. Here is the math and the habits that matter.

Let us start with the free part. Claude Code talks to Claude models, and one of them, Claude Haiku 5.5, is on the free plan. The free plan's 1M monthly tokens work on the 8 free models, and Haiku counts 1× there, so ANTHROPIC_MODEL=claude-haiku-5-5 runs Claude Code on a free key. The other Claude models, such as Opus and Sonnet, need a paid plan; a free account that asks for them gets 403 upgrade_required.

So "cheapest" here means three things: the free plan with Haiku if it is enough for you, the smallest paid plan that fits your use, and habits that make each session use fewer plan tokens.

The math: plan size × the Claude rates

Each model uses plan tokens at its own rate. The Claude rates are:

  • Claude Opus and Sonnet: 3 plan tokens per token.
  • Claude Haiku 5.5: 1.5 plan tokens per token.
PlanPrice (30 days)Plan tokensOpus / Sonnet (3×)Haiku 5.5 (1.5×)
Starter$1.2030M10M20M
Basic$3.50100M33.3M66.7M
Pro$5.75200M66.7M133.3M
Scale$11.50500M166.7M333.3M
Ultra$19.991B333.3M666.7M

Input and output tokens both count. That matters more for Claude Code than for a chat app: an agent sends the conversation, the files it has read and the tool results back to the model on every turn. A long session can send far more input than it gets back as output.

The cheapest plan is the smallest one your real usage fits into. Start with Starter or Basic, watch Dashboard → Usage for a few days, then size up if needed. If you buy too large, unused tokens can be refunded at any time — you get back what you paid times the unused share.

Setup

# Needs a paid plan: only Claude Haiku 5.5 is on the free plan.
export ANTHROPIC_BASE_URL=https://freemodel.in
export ANTHROPIC_AUTH_TOKEN=fm_your_key_here
export ANTHROPIC_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-5-5   # Claude Code's background model must be a listed model

claude

The last line is not optional. Claude Code sends some background requests to a small model, and that model must be one we list; otherwise those requests fail with 404 model_not_found. claude-haiku-5-5 is the accepted dash spelling of claude-haiku-5.5. On Windows PowerShell, use $env:ANTHROPIC_BASE_URL = "https://freemodel.in" and so on. Full details are in the coding agents docs and using Claude Code with a custom API.

Seven habits that use fewer plan tokens

1. Use /clear between unrelated tasks

/clear starts a fresh conversation. Without it, the next task carries the whole history of the last one, and every turn resends it. This is the single biggest saving for most people.

2. Use /compact on long tasks

When one task genuinely needs a long session, /compact replaces the history with a summary, so later turns send less.

3. Put small tasks on Haiku

Renames, formatting, commit messages, a quick question about one file: switch with /model claude-haiku-5-5, then switch back. At 1.5× it uses half the plan tokens of Opus or Sonnet for the same token count.

4. Do not switch between Opus and Sonnet to save tokens

On FreeModel both are 3×, so swapping one for the other does not change the rate. Choose between them for the task, not the price — see Claude Opus vs Sonnet for coding.

5. Point it at the right files

Tell Claude Code which files or folders matter. Every file it reads becomes input on the following turns. A short, specific instruction keeps the context small.

6. Keep CLAUDE.md short

Claude Code loads your project's CLAUDE.md into the context of every session. A few focused lines cost little; pages of notes are sent again in every session.

A worked example

Assume a developer uses about 1.5M tokens a day on claude-sonnet-5 over 20 working days: 30M tokens × 3 = 90M plan tokens. That fits Basic (100M), with little room.

Now move one fifth of the work — the small edits — to Haiku: 24M × 3 + 6M × 1.5 = 72M + 9M = 81M plan tokens. Same Basic plan, more headroom. Add /clear between tasks and the input side shrinks further; your usage page will show by how much.

These figures are an illustration, not a measurement. Your own numbers will differ.

When tokens run out

The API answers 402 with a clear message, and nothing extra is charged. A request that fails is not charged either. Plans last 30 days and do not renew on their own, so you will never be billed without buying. Pay by UPI or USDT (BEP-20) on the pricing page.

FAQ

Can I run Claude Code on the FreeModel free plan?

Yes, with Claude Haiku 5.5: set ANTHROPIC_MODEL=claude-haiku-5-5. It counts 1× on the free plan. The other Claude models need a paid plan; the smallest is Starter at $1.20 for 30M plan tokens over 30 days.

How many Claude tokens does Starter cover?

10M tokens on Claude Opus or Sonnet at 3x, or 20M tokens on Claude Haiku 5.5 at 1.5x. Input and output both count.

Why do I have to set ANTHROPIC_DEFAULT_HAIKU_MODEL?

Claude Code sends some background requests to a small model. That model must be a listed model on FreeModel, so set it to claude-haiku-5-5. It is also the lowest-rate Claude model.

What happens when my plan tokens run out mid-session?

The API answers HTTP 402 with a clear message and nothing extra is charged. Buy a new plan or top up, then continue.

Ready to build?

Grab a free API key — 1M tokens on 8 free models after a one-time Telegram verification, no card. Every model from $1.20.

Keep reading

All articles
ComparisonsNovember 25, 2026

Claude Opus vs Sonnet for Coding on FreeModel

Same 3× rate, same capabilities. How to split coding work between them.

ComparisonsNovember 25, 2026

Claude Fable vs Opus: When to Use Which

Fable uses 4 plan tokens per token, Opus 3. A decision guide based on listed facts.

ModelsNovember 25, 2026

How Plan Tokens Decide Which Plan You Need

Multipliers, worked examples and a simple formula for picking a plan.