FreeModel

Cheapest way to run Claude Code in 2026: 6 free-first LLM gateways compared by real numbers

Claude Code is the most expensive habit most developers picked up this year. Not because any single model is costly — a million input tokens of Claude Sonnet 5.5 is $2, and a heavy day of agentic coding rarely crosses 50 million input tokens — but because the default setup sends every request to the most expensive route available: your Anthropic API key, billed at list price, with no free capacity in front of it.

There is a cheaper shape for the same setup. A gateway that tries free capacity first and falls back to paid routes automatically turns the same Claude Code session into a mostly-free one. I run one of those gateways, so I measured all of them. Here are the numbers.

What "free LLM API gateway" actually means

A free LLM API gateway is a single endpoint that accepts your API calls, routes each one to a model provider, and prefers provider capacity you do not pay for — promotional quotas, free-tier models, off-peak capacity — before touching anything billed. Three properties separate it from a plain proxy:

  1. It supplies the model access. You bring one key (the gateway's), not ten provider accounts.
  2. Free-first is the default, not an option. Every request tries free routes first; you do not tag individual calls.
  3. Failure is a log line, not your problem. When a free route dies, the gateway retries or fails over to paid capacity and returns one response.

If any of the three is missing, what you have is either a dashboard over your own keys or a free trial with a countdown. Both are fine products. Neither is a free gateway.

The 7 numbers that matter more than the model count

Gateway marketing leads with model counts. They are the least comparable number in the industry — counts mix text models, image models, routing aliases and retired entries in one bucket. These seven numbers decide your actual bill:

  1. Card required to start: does signup demand a credit card before the first call? (FreeModel: no. OpenRouter: no.)
  2. Free allowance, in requests or tokens per day: OpenRouter gives 50 requests/day on the free tier, rising to 1,000/day after $10 of lifetime credit purchases.
  3. Credit-purchase fee: OpenRouter takes 5.5% on every credit purchase, $0.80 minimum. On a $20 top-up that is $1.10 gone before a single token is spent.
  4. Fallback behavior: what happens when free capacity runs out — hard stop, or automatic paid fallback? This is the difference between a 3 a.m. outage and a slightly larger bill.
  5. Per-token price vs. official: Claude Sonnet 5.5 lists at $2/$10 per million tokens on Anthropic's own pricing page. Any gateway charging more than that per token is adding margin you should be able to name.
  6. Endpoint compatibility: Claude Code speaks the Anthropic Messages format. A gateway that only offers an OpenAI-compatible endpoint forces you through a translation layer.
  7. Who operates the request path: hosted (someone else's uptime) or self-hosted (your servers, your database, your patching).

Six gateways, side by side

GatewayCard to startFree allowanceSupplies model accessClaude Code directHeadline cost
FreeModelNoFree capacity tried first, paid fallback behind itYesYes — Anthropic-compatible endpoint on the same base URLFree-first routing
OpenRouterNo50 req/day; 1,000/day after $10 lifetime creditYesYes5.5% fee on credit purchases ($0.80 min)
Vercel AI GatewayVariesSmall monthly free credit (amount unpublished)Optional (BYOK or theirs)YesNo markup on tokens
Cloudflare AI GatewayNoCore features free (analytics, caching, retries)No — BYOKVia your own keysFree core; 5% only if Cloudflare buys tokens
PortkeyNo10,000 req/monthNo — BYOK onlyVia your own keysFree to 10K req/mo, then $49/mo
LiteLLMN/AThe software is free (MIT)No — you supply everythingYes, self-hostedYour infra + provider bills

Two rows deserve a closer look, because they are the two serious answers to "cheapest way to use Claude Code."

FreeModel: free-first routing, in plain numbers

FreeModel is the gateway this article is published on, so read the numbers and check them — every claim below is verifiable from a public endpoint or the vendor's own page.

The honest limits: it is hosted only, so traffic that must stay inside your network is a non-starter, and there are no compliance certifications, per-team budgets, or audit logs. If you need those, you are in Portkey territory and the price reflects it.

OpenRouter after the Stripe acquisition: the fee math

OpenRouter remains the largest catalogue — 460 models on its public list — and the default that third-party tools and old tutorials assume. Two things changed the math in 2026.

First, the fee. The 5.5% charge applies to credit purchases, with a $0.80 minimum, and it is documented in OpenRouter's own FAQ. Run Claude Code at roughly $30/month of token spend and the fee adds about $1.65. Small, but it is a tax on the exact behavior — topping up — that heavy Claude Code use requires, and it compounds with the free tier's real shape: 50 requests/day is roughly one serious agentic session, so most developers land on paid credits within the first week.

Second, the acquisition. Stripe agreed to acquire OpenRouter in August 2026, with press figures between $7 billion and $8 billion. Nobody outside the two companies knows what that does to pricing, the free tier, or the :free suffix routing. That is not an accusation — it is an unpriced risk sitting in the middle of your request path.

The fair summary: if catalogue breadth is the deciding factor, OpenRouter still wins and nothing here is close. If your actual question is "cheapest way to run Claude Code," the catalogue is not the deciding factor — the fee, the free-tier shape, and the acquisition overhang are.

Pointing Claude Code at a gateway: 4 steps

This is the whole migration. It is a configuration change, not a code change:

  1. Get a key. Sign up on the gateway (no card required on FreeModel or OpenRouter) and copy the API key.
  2. Set the base URL. Point Claude Code at the gateway's endpoint — https://freemodel.online/v1 for FreeModel — keeping the Anthropic message format. No translation layer is needed where the gateway speaks both formats.
  3. Run one real session. Not a hello-world: take a task you actually did last week and run it. Compare the answers and the latency against your current setup before you touch billing.
  4. Check the first bill line. Confirm that free routes were actually preferred — the gateway's usage view should show which requests hit free capacity and which fell back to paid. If it cannot show you that split, you cannot verify the "free-first" claim, and you should treat it as marketing.

A real week of Claude Code: what it costs on each route

Assume a working week of agentic coding: 200 million input tokens and 40 million output tokens, all on Claude Sonnet 5.5-class models.

The takeaway is not that one gateway is magic. It is that the default route — direct key, list price, zero free capacity — is the most expensive possible configuration, and anything with free-first routing beats it by exactly the free fraction.

FAQ

Is a free LLM API gateway actually free?

For low-volume use, close to it: free capacity absorbs the traffic and you pay nothing. At Claude Code volumes you will exceed free capacity and pay list-price rates on the overflow — still cheaper than the direct-key default, because the free fraction is never zero.

Can Claude Code really point at a third-party gateway?

Yes, where the gateway offers an Anthropic-compatible endpoint. Claude Code sends the Anthropic Messages format; the gateway translates it to whatever the backing provider speaks. FreeModel exposes both formats on the same base URL, so the change is one setting.

What is the catch with free-first routing?

Free capacity is provider promotional quota, and it fluctuates. The gateway's job is to absorb that fluctuation — retry, fail over, keep your session alive. Evaluate a gateway on its failover behavior (how fast it switches, how many routes it tries), not on the size of its free tier on any given day.

Should I switch off OpenRouter?

Not necessarily. If you value the 460-model catalogue, the tutorial ecosystem that assumes OpenRouter, and you can name what the 5.5% fee costs you per month, staying is rational. Switch when the fee, the free-tier shape, or the post-acquisition uncertainty costs you more than remapping model ids — which is the one real migration cost, since model names differ between gateways.

Do I need provider accounts with a free gateway?

No — that is the structural difference. LiteLLM, Portkey, Vercel, and Cloudflare gateways route with keys you supply, so nothing works until you have accounts and payment methods at each provider. A gateway that supplies its own access removes that entire setup step.

Disclosure

I work on FreeModel, one of the six products compared above. Every third-party number in this article comes from the vendor's own documentation or a public endpoint, linked where it appears. FreeModel's prices were read from freemodel.online/pricing and vendor list prices were verified against the vendors' pricing pages on 2026-10-19. If a number here disagrees with the page it came from, the page is right — tell us and it gets corrected.

Word count: ~1,450