Claude Code Pricing: What It Costs, and How to Run It Free

claude-codepricingfree-tierslocal-modelsagents

Last verified:

Tested with Claude Code 2.1.325 and Codex CLI 0.169.0 — telemetry through .

On this page
  1. How a different provider can answer Claude Code#
  2. Which providers actually offer a free route today?#
  3. Configure a pairing#
  4. OpenRouter: direct connection#
  5. One localhost gateway for the OpenAI-compatible providers#
  6. Google Gemini API#
  7. Groq#
  8. Mistral Studio#
  9. NVIDIA’s hosted API Catalog#
  10. Z.ai’s free Flash models#
  11. Cloudflare Workers AI#
  12. Local Ollama#
  13. Routes excluded from the free Claude Code setup#
  14. A small headless trial#
  15. When free runs out: the cheapest paid routes behind Claude Code#
  16. What the free route gives up#
  17. If you pay, use all of it#
  18. Pick a route for your constraints#
  19. Tested with#
For terminals & agents: curl -s https://jedarden.com/guides/claude-code-pricing.md

Claude Code costs $20/month on Pro, $100 on Max, or $200 on Ultra; Team starts at $20 per seat per month with annual billing. You can also pay per API token. Anthropic’s Free chat plan does not include Claude Code. You can install the terminal client and connect a different model through a compatible endpoint, including some providers’ free APIs or a local model. That makes inference free within its allowance; it does not give you Claude’s models free. These prices and the paid-plan inclusion were checked against Anthropic’s pricing and Claude Code’s cost documentation on November 14, 2026.

TL;DR — Cost: Pro $20/month, Max $100, Ultra $200; Team and per-token billing are other routes.

Is it free? Anthropic’s Free chat plan does not include Claude Code. Other providers’ free models or a local model can power the client instead.

What worked here: OpenRouter’s free model completed one small task, then rate limited; a small local model on a CPU connected but did not finish. Z.ai Flash answered with a Coding Plan key; a free-only key was not tested.

Old free lists need checking: Cerebras is now a card-backed trial, GitHub Models is retired, and OpenCode’s free chat models require its own client.

If you pay, use all of it: the allowance is prepaid, and whatever is left at the reset is gone. Buy a small plan and run it to the limit, or buy Ultra and commit to filling it with finished work.

The cheapest paid step up: OpenCode Go is $10/month, documented for Claude Code but not run here; the fleet-tested GLM Coding Plan starts at $18. Pro at $20 buys a direct Anthropic subscription.

RouteMonthly USDTerms, annual options and token rates
Claude Pro$20$200 annual upfront, advertised $17/month equivalent; shared chat/code allowance.
Claude Max$1005x Pro usage; $100 monthly API credits.
Claude Ultra (formerly Max 20x)$20010x Pro weekly; no five-hour limit for verified accounts; $200 API credits.
Team Standard$25$20/seat/month annually; 2–150 people; Claude Code included.
Team Premium$125$100/seat/month annually; 5x Standard usage.
Anthropic APIMeteredPer 1M tokens: Haiku 5.5 $0.10 input / $0.50 output for prompts up to 100K; $0.50 / $2.50 above. Sonnet 5.5 $2 / $10; Opus 5.5 $4 / $20. Caching/tools affect bill.
Other-provider free tier / local$0Non-Claude model; quotas, data policy, local hardware and compatibility apply.
OpenCode Go$10Paid third-party route; vendor validates Claude Code but does not promise continued compatibility. Not run here; model-specific limits and data terms. Catalog also lists Claude Haiku 5.5.
GLM Coding Plan Lite$18From $18/month; native Claude Code pairing used by this fleet since July 2026. Credits and concurrency limits apply; GLM models.

Team is for two to 150 people. The $200 tier is Ultra, formerly Max 20x; Max now names the $100 tier. Pro’s annual price is advertised as $17/month, with $200 paid upfront. A subscription has usage limits, and chat shares its pool with code. See the measured Pro, Max and Ultra comparison for choosing among those allowances.

For API budgeting, Haiku 5.5 costs $0.10 input/$0.50 output per million tokens for prompts up to 100K tokens, rising to $0.50/$2.50 above that threshold. Opus 5.5 costs $4/$20. Those are standard uncached token prices, not a monthly bill prediction. The API price schedule covers cache writes, cache hits and other charges; the terminal’s local cost estimate is not an invoice.

How a different provider can answer Claude Code#

This fleet has run Claude Code against a non-Anthropic endpoint in production since July 2026, using these same endpoint, credential and model variables. The GLM Coding Plan study records about 116,000 sessions and 1.5 million model calls. Connecting another model is the same mechanism used by that paid production setup; a free model’s allowance and entitlement are separate questions.

Claude Code sends messages, tool definitions and tool results. The endpoint must understand that protocol; changing a URL alone does not translate it. There are two useful cases:

  1. Native Anthropic compatibility. The provider exposes a Messages endpoint itself. OpenRouter and current Ollama do this, so Claude Code can connect directly.
  2. An OpenAI-compatible API. Gemini’s compatibility endpoint, Groq and several other providers speak a different message format. Put a translating gateway on 127.0.0.1; Claude Code speaks Anthropic to it, and it speaks the provider’s format upstream.

The current gateway connection documentation names ANTHROPIC_BASE_URL for the destination, ANTHROPIC_AUTH_TOKEN for a bearer credential, and ANTHROPIC_API_KEY for an x-api-key credential. A settings file can set those under env; a shell export works for processes launched in that terminal. Settings can override the shell, so inspect /status if a change appears ineffective. Keep credentials out of shared settings.

The model configuration documentation names ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL and CLAUDE_CODE_SUBAGENT_MODEL. Pin every class to a model that exists upstream. The fleet’s GLM adapters use these same destination, bearer-token and model overrides.

Anthropic documents the connection mechanism, but does not support routing to non-Claude models. A model advertising tool calling also does not establish that its tool loop works correctly with this particular client. The trial below separates those claims.

Which providers actually offer a free route today?#

Every allowance below was re-read from the provider’s own pages on November 14, 2026. A dash means the vendor sends you to your account’s limits page or does not publish a stable figure; it does not mean unlimited. Context is the selected model’s advertised window, which can exceed your free account’s request-size or token-rate limit. Tool support in this table is documented capability; the trial below shows which tool loops were exercised here.

Provider / selected modelsFree allowanceAgent turns/dayConnection; toolsContextData use
OpenRouter: cohere/north-mini-code:free (trial); openrouter/free (automatic free-only router)20 requests/min; 50 requests/day without $10 lifetime credit purchases; 1,000/day after the threshold. Free model availability varies.50 ceilingNative Anthropic endpoint. Tool-aware router selects models that support requested tools; success still depends on model256,000 tokens for north-mini-code:free; router selection variesOpenRouter use/logging opt-in; upstream provider policies differ. Restrict routing to endpoints meeting your data policy.
Google Gemini API: gemini-3.5-flash-lite; gemini-2.5-flash-lite for eligible existing usersFree input/output on eligible models; current RPM/TPM/RPD are project-specific in AI Studio, not a universal public table.Not publishedLocal translating gateway. Function calling documented; translation and model must preserve tool results1,048,576 input / 65,536 output for Gemini 3.5 Flash-LiteFree-tier content used to improve Google products; paid-tier handling differs and regional terms apply.
Groq: openai/gpt-oss-120b; openai/gpt-oss-20b; qwen/qwen3.8-27b30 RPM; 1,000 RPD; 8,000 TPM; 200,000 TPD for GPT OSS 120B/20B and Qwen3.8 27B.25 ceiling (modeled)Local translating gateway. Local function calling documented; successful Claude Code tool loop must be tested131,072 tokensNo inference retention by default; reliability/abuse logs up to 30 days with ZDR opt-out. Customer training data used only to provide service.
Cerebras: gpt-oss-120b; qwen-3.8-27bOne-time $5 trial, valid payment method required; expires 30 days. Not a recurring no-card free tier.Unavailable for this pairingLocal translating gateway. Tool calling documented; not established here through Claude CodeModel/account dependent; inspect model card and consolePolicy says chatbot conversations do not train models and inference inputs/outputs are not retained; logs removed when no longer necessary.
Mistral Studio: mistral-small-latest / ministral family subject to free-account accessFree mode for evaluation; numeric quotas and permitted models shown in account Admin Limits, not fixed publicly.Not publishedLocal translating gateway. Function calling supported on named models; free entitlement and translated loop must be checked256K for Mistral Small 4 / Ministral 3; other models varyFree-mode inputs/outputs may train Mistral models; account opt-out available.
NVIDIA API Catalog: openai/gpt-oss-20b (current free catalog example)No-cost hosted evaluation; per-model/account/traffic rate limits shown in account. Old 1,000-credit figures are obsolete.Not publishedLocal translating gateway. GPT OSS 20B catalog states function calling supported; translated Claude Code loop untested131K advertised for GPT OSS 20B; free request limits may be lowerTrial terms: no post-session content use/storage except stated service/security exceptions; confidential and sensitive data prohibited; evaluation only.
GitHub Models: NoneNone: fully retired July 30, 2026; inference API/catalog/playground unavailable.Unavailable for this pairingUnavailable. Not applicableNot applicableNot applicable: retired service
Z.ai: glm-4.5-flash; glm-4.7-flashGLM-4.7-Flash and GLM-4.5-Flash input/output free; GLM-4.6V-Flash also free for vision. Public pricing gives no stable daily quota.Not publishedGateway example for ordinary free API; native fleet route answered with a Coding Plan key. A free-only key was not tested. Tool calls observed on the fleet route reporting glm-4.7-flash; free-only gateway configuration untested128K for GLM 4.5 family; confirm free model endpoint capabilitiesGeneral privacy policy allows model improvement; API DPA has narrower business processing terms. Free personal API no-training guarantee not established.
OpenCode Zen / Console: GLM 5.3 Flash Free, DeepSeek V4.1 Flash Free, MiniMax M3.1 Flash Free, MiMo V2.6 Flash Free, Nemotron 3 Ultra / 3.5 Lightning / 3.5 Super VL Free, Big Pickle, Iceman, Inkling 2 Small Free, Beam Free, Flint 40B FreeTwelve limited-time free chat models in OpenCode; free-tier chat requires OpenCode, not third-party clients.Unavailable for this pairingFree chat client restricted. Supported by OpenCode; not eligible for free Claude Code pairingModel dependent; not a free Claude Code routeModel-specific: first 3 no training/ZDR; Inkling may train; Beam no training/30 day safety retention; several collect improvement feedback.
Cloudflare Workers AI: @cf/meta/llama-3.3-70b-instruct-fp8-fast; other Workers AI models10,000 neurons/day; daily reset 00:00 UTC; model-weighted, not a fixed token/request grant.21 ceiling (modeled)Local translating gateway. Selected model supports function calling; translated Claude Code compatibility untested24,000 tokens for selected Llama 3.3 endpointNo training on Workers AI Customer Content; standard inference zero retention subject to stated exceptions.
Local Ollama: qwen3:1.7b (trial); qwen3:4b (2.5 GB documented alternative)No hosted quota; limited by RAM, context, speed, electricity and model license.Hardware dependentNative Anthropic endpoint on localhost. Ollama supports tool_use/tool_result; small-model reliability must be measured32,768 configured in this trial; model/runtime limits varyLocal inference stays on your machine when using a downloaded local model; cloud models are a different route.

Here one agent turn means one inference request, not one task you type. Reading a file, editing it, receiving a test failure and fixing it can consume several turns. For a hypothetical ten-request task, 50 requests buys at most five tasks before retries or ancillary requests. This is arithmetic, not a measured daily productivity claim. Groq’s modeled 25 turns assume 7K input plus 1K output tokens per request: its 200K daily token ceiling divided by 8K. The 8K minute ceiling leaves little room for a growing agent prompt. Cloudflare’s estimate uses its published 26,668 neurons per million input tokens and 204,805 per million output tokens: floor(10000 / (10000 × 26668/1e6 + 1000 × 204805/1e6)) = 21. Longer prompts reduce it.

Some familiar free-tier lists are stale. Cerebras now describes trial credits, and its pricing footnote requires a payment method. GitHub Models is fully retired. OpenCode’s current model page says free chat requires OpenCode; other clients must use paid models or Go. These are useful distinctions before spending an afternoon configuring a route that cannot be free in Claude Code.

Configure a pairing#

Use a fresh terminal and a disposable project first. The examples use placeholders for keys. Do not paste a real key into a committed file. Do not disable the client’s permission checks to make a provider work.

This helper makes every model class use the selected route. Run it once in the terminal where you will launch Claude Code:

cc_model() {
  export ANTHROPIC_MODEL="$1"
  export ANTHROPIC_DEFAULT_SONNET_MODEL="$1"
  export ANTHROPIC_DEFAULT_OPUS_MODEL="$1"
  export ANTHROPIC_DEFAULT_HAIKU_MODEL="$1"
  export CLAUDE_CODE_SUBAGENT_MODEL="$1"
}

OpenRouter: direct connection#

OpenRouter’s Claude Code instructions use this base URL and explicitly empty ANTHROPIC_API_KEY:

export OPENROUTER_API_KEY='<YOUR_OPENROUTER_KEY>'
export ANTHROPIC_BASE_URL='https://openrouter.ai/api'
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_API_KEY=''
cc_model 'cohere/north-mini-code:free'
claude --model "$ANTHROPIC_MODEL"

The free router chooses among available free models and filters for requested capabilities. The configuration pins the North Mini Code free model used in this trial, with a 256K context window. To try the changing free pool instead, run cc_model 'openrouter/free' before launching the client. The free-variant documentation warns that a fallback array containing paid models can incur charges; use only free entries or the free router alone.

The limits page gives 50 daily requests below $10 lifetime purchased credits and 1,000 after that threshold, both at 20 per minute. The higher ceiling is not a never-paid offer. The live catalog also listed free variants of Ling 3.2 Flash, ERNIE 5.5 Flash Preview, Inkling 2 Small, LFM 3 1.7B, Particle 1, Flint v1, Nemotron 3.5 Super VL and Lightning, Dots 3 Note Preview, Nemotron 3 Ultra and Nano Omni, and Gemma 4 26B/31B. These change; a catalog tools flag is not a tested Claude Code loop. Check both the router’s data policy and the chosen upstream’s policy; disabling training can remove available free endpoints.

One localhost gateway for the OpenAI-compatible providers#

LiteLLM documents translating non-Anthropic models for Claude Code. This gateway setup is configuration from documentation, not tested here. The following setup uses one upstream at a time. It keeps the key in an environment variable and binds the gateway to localhost. Run the server in one terminal; use the second-terminal exports afterwards.

python3 -m venv "$HOME/.cache/cc-free-gateway"
"$HOME/.cache/cc-free-gateway/bin/pip" install 'litellm[proxy]'
export FREE_API_KEY='<YOUR_PROVIDER_KEY>'
export FREE_API_BASE='https://api.groq.com/openai/v1'
export FREE_MODEL='openai/openai/gpt-oss-120b'
export LITELLM_MASTER_KEY='<CHOOSE_A_LOCAL_GATEWAY_KEY>'

cat > "$HOME/.cache/cc-free-gateway/config.yaml" <<'YAML'
model_list:
  - model_name: free-coding
    litellm_params:
      model: os.environ/FREE_MODEL
      api_base: os.environ/FREE_API_BASE
      api_key: os.environ/FREE_API_KEY
litellm_settings:
  drop_params: true
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
YAML

"$HOME/.cache/cc-free-gateway/bin/litellm" \
  --config "$HOME/.cache/cc-free-gateway/config.yaml" \
  --host 127.0.0.1 --port 4000

In another terminal, define cc_model as above, then:

export ANTHROPIC_BASE_URL='http://127.0.0.1:4000'
export ANTHROPIC_AUTH_TOKEN='<THE_SAME_LOCAL_GATEWAY_KEY>'
export ANTHROPIC_API_KEY=''
cc_model 'free-coding'
claude --model "$ANTHROPIC_MODEL"

The openai/ prefix below is LiteLLM’s provider selector; the remaining model ID is sent upstream. Stop the gateway before changing its provider variables, then restart it. drop_params can discard unsupported optional parameters; it cannot add missing tool support or recover a model’s broken tool arguments. Keep public test prompts small before giving the route a real edit.

Google Gemini API#

Configuration from the provider’s documentation, not tested here unless the trial table explicitly says otherwise. Replace the three upstream exports before starting the gateway:

export FREE_API_KEY='<YOUR_GEMINI_API_KEY>'
export FREE_API_BASE='https://generativelanguage.googleapis.com/v1beta/openai'
export FREE_MODEL='openai/gemini-3.5-flash-lite'

Google documents the OpenAI endpoint, Flash-Lite’s context and capabilities, and free input/output. Check your project’s active quotas before running an agent. Older 2.5 models are restricted to prior active users; use current models for a new project. Google’s terms distinguish free-service data handling and regional exceptions. Do not treat a free account as confidential inference by default.

Groq#

Configuration from the provider’s documentation, not tested here unless listed below:

export FREE_API_KEY='<YOUR_GROQ_KEY>'
export FREE_API_BASE='https://api.groq.com/openai/v1'
export FREE_MODEL='openai/openai/gpt-oss-120b'

The double openai/ is intentional: the first selects the gateway’s compatible provider, and openai/gpt-oss-120b is Groq’s model ID. Its rate limits include only 8K tokens per minute on the free tier, despite a 131K model context. A client with a long system prompt may be rejected immediately. Local tool calling is a provider capability, not a guarantee of a successful translated coding run. Data controls cover inference retention and the exceptions; the services agreement limits use of customer training data to providing the service.

Mistral Studio#

Configuration from the provider’s documentation, not tested here unless listed below:

export FREE_API_KEY='<YOUR_MISTRAL_KEY>'
export FREE_API_BASE='https://api.mistral.ai/v1'
export FREE_MODEL='openai/mistral-small-latest'

Check your organization’s limits and model access. Mistral’s free-mode explanation gives no universal numeric grant. The model must be available to your account and support function calling. Its data-use policy says free inputs and outputs may train models, with an opt-out; its context table is separate from free access.

NVIDIA’s hosted API Catalog#

Configuration from the provider’s documentation, not tested here unless listed below. Select a currently available tool-capable model from the catalog:

export FREE_API_KEY='<YOUR_NVIDIA_API_KEY>'
export FREE_API_BASE='https://integrate.api.nvidia.com/v1'
export FREE_MODEL='openai/openai/gpt-oss-20b'

The current GPT OSS 20B catalog card lists a free endpoint, function calling and 131K context. The extra openai/ selects the gateway provider; the upstream model ID is openai/gpt-oss-20b. The older Llama 3.3 70B free endpoint is deprecated, which is why the example uses a currently available model. The quickstart explains key access. NVIDIA’s official FAQ says rate limits vary by model and current demand and are shown in the account. A staff clarification says the old credit system was replaced. The API Trial Terms limit this service to testing/evaluation, prohibit confidential or sensitive content, and describe content processing and security exceptions. This is a public-code experiment route, not a free production service.

Z.ai’s free Flash models#

Free-only API configuration from documentation, not tested here. The Coding Plan key test below used a different, private Anthropic-compatible endpoint:

export FREE_API_KEY='<YOUR_ZAI_API_KEY>'
export FREE_API_BASE='https://api.z.ai/api/paas/v4'
export FREE_MODEL='openai/glm-4.5-flash'

The price page lists GLM-4.5-Flash and GLM-4.7-Flash as free. GLM-5.3-Flash is paid. The GLM-4.5 documentation describes agent tools and 128K context. The native Anthropic endpoint in Z.ai’s Claude Code instructions is documented for its paid Coding Plan; do not assume an ordinary free Flash key has that entitlement. This free example uses the standard API through translation. The privacy policy includes model improvement and a separate business API DPA; I have not established a no-training commitment for free personal API use.

Cloudflare Workers AI#

Configuration from the provider’s documentation, not tested here unless listed below. You need an account ID and a token with Workers AI permission; the ID is not a secret:

export FREE_API_KEY='<YOUR_WORKERS_AI_TOKEN>'
export FREE_API_BASE='https://api.cloudflare.com/client/v4/accounts/<YOUR_ACCOUNT_ID>/ai/v1'
export FREE_MODEL='openai/@cf/meta/llama-3.3-70b-instruct-fp8-fast'

Cloudflare documents its compatible API, neuron allocation, selected model’s 24K context and function calling, and no-training/data-retention commitments. Keep the account on Workers Free for a hard stop at the daily grant; Workers Paid can bill usage beyond it.

Local Ollama#

With a current Ollama installed, its native Anthropic endpoint removes the gateway step. In one terminal:

export OLLAMA_HOST='127.0.0.1:11434'
export OLLAMA_NO_CLOUD=1
export OLLAMA_CONTEXT_LENGTH=32768
ollama serve

In another terminal, after defining cc_model:

ollama pull qwen3:1.7b
export ANTHROPIC_BASE_URL='http://127.0.0.1:11434'
export ANTHROPIC_AUTH_TOKEN='ollama'
export ANTHROPIC_API_KEY=''
cc_model 'qwen3:1.7b'
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=32768
claude --model "$ANTHROPIC_MODEL"

The 1.7B model is advertised as a 1.4GB download and supports tools. The 4B alternative is 2.5GB; it was not the model in this trial. It is deliberately a small-machine example, not a claim that it matches Claude on repository work. The example sets both runtime and client to 32K tokens. Allocate a smaller window if your RAM cannot support it; context requires memory beyond the model’s download. Ollama’s local FAQ explains local-only mode and says local prompts are not sent back to Ollama. A cloud-tagged model is a different route.

Routes excluded from the free Claude Code setup#

Cerebras publishes inference retention and training commitments and a privacy policy, but eligibility is the reason it is excluded here. It can use the same gateway with FREE_API_BASE='https://api.cerebras.ai/v1' and FREE_MODEL='openai/gpt-oss-120b', but its current card-backed promotional credit is not a recurring no-card free tier. GitHub Models has no working configuration after retirement. OpenCode’s current free chat models are for its own client; use OpenCode for that offer, or pay for models that permit other clients. Changing environment variables does not change those eligibility rules.

A small headless trial#

I ran Claude Code 2.1.325 against OpenRouter’s native Messages endpoint on cohere/north-mini-code:free, and Ollama 0.32.3 on a CPU-only Qwen3 1.7B model. Both delivered tool calls. A successful connection did not always deliver an acceptable change.

The tasks and source baseline match the OpenCode comparison: add edge-case unit tests, fix an injected ledger bug, and write a README section from the implementation. Each attempt starts from the same snapshot. The full Python suite and an inspection of the diff determine acceptability; an existing green suite alone cannot certify that requested tests or prose were added.

The first pass used an 18-turn cap and produced 0 acceptable changes in 3 tasks. The test-writing task made no edit before the cap. The bug fix removed cross-cluster collisions but introduced three failures when a cluster field was absent; 724 tests passed. The README edit landed in the right place but omitted most of the required normalization behavior.

I then ran the test-writing task again with the 60-turn and 900-second caps used by the OpenCode study. It added eight correct test cases, with all 735 tests passing, then Claude Code ended after fifteen HTTP 429 retry responses. The change was acceptable even though the CLI exit was an error. The remaining two tasks were not repeated after rate limiting.

For a buyer, that is the practical limit: on the free allowance, one small task can use up the session. A usable diff does not mean enough capacity remains for the next edit. The run does not establish which quota caused the 429s or when it resets.

These runs used isolated settings, five available tools and a short system prompt. That differs from the earlier study’s full fleet configuration, so compare small-task outcomes rather than treating the timings as a model ranking. CLI turns include bookkeeping and are not exact HTTP-request counts. The repeated task’s wall time includes retry backoff.

Z.ai Flash: answered on the native endpoint with a Coding Plan key; a free-only key was not tested. The successful route was the fleet’s private Anthropic-compatible gateway and reported glm-4.7-flash. A separate probe of Z.ai’s public native endpoint returned HTTP 529 without an answer. The private-route result does not establish free-only access to the public endpoint.

The same three tasks ran sequentially with the 60-turn and 900-second caps. Test writing added eleven cases, with 738 tests passing. The bug repair passed the existing 727 tests but changed explicit-null cluster handling, so it was not acceptable. The README task added a correct 160-word section. That makes 2 acceptable changes in 3 tasks.

There were at least 36 observed HTTP 529 overload retries. Seven other retries did not retain a numeric status and are not included in that count. These are availability errors, not proof that the model or key was refused. Cached input is shown separately from uncached input; the token totals do not establish what the Coding Plan charged.

PairingAcceptable / attemptedWall secondsCLI turnsTool failures429 / 529 retriesUncached input / output tokensCache read / write tokens
Local CPU: README task0 / 1300Not reported10 / Not reportedNot reported / Not reportedNot reported / Not reported
OpenRouter: test task repeated, 60 turns1 / 1228.914215 / Not reported69,610 / 3,4870 / 0
OpenRouter: first three tasks, 18 turns0 / 3108.951130 / Not reported297,142 / 9,1060 / 0
Z.ai Flash: fleet Coding Plan key2 / 3644.359140 / ≥3638,199 / 6,203328,769 / 0

Local first-generation decode: observed 4.82 tokens/second (1,247 tokens in about 259 seconds), excluding prompt processing and the later interrupted request. This is not whole-task throughput.

The local README attempt ran for 300 seconds, made one rejected edit against text that did not exist, and timed out without a usable change or final usage response. The downloaded model was about 1.36 GB, with a 32K runtime context, under a four-CPU quota and 12 GB memory ceiling. It was the only local task attempted on this busy machine without a GPU. That result describes this small model and hardware allocation, not local inference as a whole.

Gemini, Groq, Mistral and NVIDIA remain configuration from the provider’s documentation, not tested here: usable inference credentials were not available for these trials. Extending the trial would require their respective developer/API accounts and eligible keys; NVIDIA also needs an evaluation entitlement. An existing Cloudflare token failed an actual Workers AI request with HTTP 401; it needs Workers AI access and a correctly scoped token. Cerebras needs a card-backed promotional account, GitHub Models is retired, and OpenCode’s free chat is client restricted. None was counted as a working Claude Code pairing.

OpenRouter used explicit free-model selection with no paid fallback. OpenRouter and Ollama connected directly. The Z.ai test used the existing private fleet gateway; the free-only translating-gateway examples above remain documentation-derived. This is a compatibility and small-edit study, not a general model ranking.

When free runs out: the cheapest paid routes behind Claude Code#

These are the next three price steps, checked against the vendors’ pages on November 14, 2026:

RouteMonthly priceWhat the evidence supports
OpenCode Go$10The vendor lists Claude Code among validated clients, while expressly declining to promise continued compatibility. Not run here.
GLM Coding PlanFrom $18The native pairing this fleet has used since July; GLM models, plan credits and concurrency limits.
Claude Pro$20A direct Anthropic subscription with Claude Code and shared chat/code usage.

Go’s current catalog also lists Claude Haiku 5.5, so Pro is the only direct Anthropic plan in this comparison, not the only way to reach an Anthropic model. Go’s model-specific usage windows and privacy rules still apply, and a validated client can stop working after an update. The OpenCode Go section explains what its $10 allowance buys. The first-hand GLM study shows what the $18-and-up alternative delivered under fleet load. Choose Pro when you want Anthropic’s own plan and model integration.

What the free route gives up#

RouteCostCapacityContextTools and editsData use
Free hosted model$0 within quotaShared, small or account-specific limitsFree token throughput can be lower than the advertised model windowTools and long edits depend on the model and gatewayProvider-specific; several free tiers permit training
Claude Pro$20 monthlyClaude and Claude Code share usage windowsModel dependent; the client compacts long sessionsAnthropic models and supported native toolingConsumer improvement preference; check and opt out if needed
Local modelHardware and electricityYour memory, CPU/GPU and patienceModel and runtime allocation; context consumes additional RAMSmall models can miss multi-step edits and tool schemasPrompts stay local when the runtime stays local

An agent repeatedly sends its growing conversation. A generous request count can therefore hide a restrictive token ceiling. A model may accept a tool schema and still return malformed arguments, repeat an unsuccessful tool, or claim a file changed when it did not. Read the diff and run the task’s acceptance check. No gateway fixes those reasoning errors.

“Free” also moves the cost into waiting and maintenance. At a time value of $30/hour, 40 minutes of avoidable setup, retries or reset-watching costs $20. At $60/hour it takes 20 minutes. That is a decision model, not a measured labor saving: use your own rate, and compare recurring monthly friction with the bill. Pro is usually the simpler purchase once an agent becomes daily work; a cheap coding plan may make sense when you want a different model and enough quota to finish. The GLM coding-plan study covers that trade, while Codex vs Claude Code compares the harnesses and their measured behavior.

If you pay, use all of it#

A subscription is prepaid inference. Pro costs $20 whether I use a tenth of its allowance or all of it, and the allowance resets on schedule whether I used it or not. Whatever is left at the reset is money I spent on nothing. Once free stops being enough, I would buy in one of two ways, and pick one on purpose.

Buy low and run it out. Take Pro at $20, or one of the $10 to $18 coding plans above, and plan to reach the limit in every window. A small allowance makes me decide which work deserves a session, and the limit arrives soon enough that I learn where it is. If I run out early most weeks, I have my evidence for Max, collected for $20 instead of a month of a larger plan I half use.

Or buy high and commit. If the budget allows, take Ultra at $200 and treat the allowance as a quota to fill. That is more work than one person can steer by hand. Filling it means learning to write a task an agent can finish alone, to run several at once, to leave work going overnight, and to check results I did not watch being made. I think this is the fastest and cheapest way to learn agentic coding: each mistake costs a few percent of a week I had already paid for.

I do not always manage it. In the eight weeks of my measured Pro, Max and Ultra comparison, the $200 account reached its cap once and peaked between 30% and 80% in the other seven.

Fill it with work, not tokens. There is a way to cheat: run the largest model at its highest effort setting for every request, and the meter reaches 100% with little effort from me. The API prices above show the gap between the models: Opus 5.5 at $4 input and $20 output per million tokens, Sonnet 5.5 at $2 and $10, and Haiku 5.5 at $0.10 and $0.50 for prompts up to 100K tokens. A larger model at a higher effort setting uses an allowance faster; it does not finish more tasks. The target is finished work, so I choose the smallest model that completes the task and spend the rest of the allowance on more tasks.

I would argue that choice costs little. Today’s mid-tier models are better than the frontier models of the previous generation, and the least they can do is approaching, if it has not already passed, the hardest thing most coding projects ask of them. That is my judgment from using them; this page does not measure it. It also has a floor. It covers a vendor’s mid-tier model, such as Sonnet. It does not cover the smallest free models in the trial above: the 1.7B local model did not finish its one task.

Pick a route for your constraints#

The picker asks your monthly budget (including $0), whether training on prompts is acceptable, daily inference-request need, and whether you have a capable local machine. Without JavaScript: prefer a local-only model for private work at $0 when the hardware is already yours; try a small hosted free quota for public experiments; move to a paid plan when daily work and time spent on limits justify the bill. Unknown quotas and unclear data policies require checking the provider account, not an automatic recommendation.

For current alternatives beyond this snapshot, the inference-plan comparison keeps the model and paid-plan choices together. Choose the route that can finish your task under its actual allowance and data terms. A zero price is useful only while the remaining constraints fit.

Tested with#

The headless trials used Claude Code 2.1.325 and Ollama 0.32.3 with Qwen3 1.7B on a CPU. The local model had a 32K context and a four-CPU, 12 GB allocation. Codex CLI 0.169.0 is recorded for comparison with the companion studies; it did not run this trial. Z.ai Flash was also tested through the private fleet gateway with a Coding Plan key, one request stream at a time. A free-only key was not tested, and direct public-native access was not established. No translating gateway was used in the OpenRouter or local pairings. The LiteLLM configurations above are documentation-derived, not measured integrations.

Prices, limits and provider terms were checked on November 14, 2026. The original three tasks, the repeated test-writing task and the single local task are identified separately because their caps differ. Preserve those distinctions when comparing results. Re-check the provider model list and allowance before relying on a free route, and refresh this study 28 days after publication.

— Jed