Skip to content

Coding

The cheapest LLM API for coding

A month of coding requests priced on Claude, GPT, Gemini, and Grok models, with and without cached input, and how to tell when the bigger model is worth paying for.

Last updated

What a month of coding requests looks like

Coding tools send a lot of input: the files you have open, the chat so far, and the tool's own instructions. The output is a few hundred lines at most. The example is 6,600 requests a month (300 a working day), about 15,000 tokens in and 1,000 out each.

The same month on each model

At list price with no caching, grouped by provider, largest model first.

ModelInputOutputPer month
Claude Opus 5.5$396$132$528
Claude Sonnet 5.5$198$66.00$264
Claude Haiku 5.5$9.90$3.30$13.20
GPT-5.5$495$198$693
GPT-6.1 Sol$198$66.00$264
GPT-6.1 Terra$99.00$33.00$132
GPT-5 mini$24.75$13.20$37.95
Gemini 3.1 Pro Preview$198$79.20$277
Gemini 3.8 Flash$74.25$24.75$99.00
Grok 4.7$198$39.60$238
Grok Build 0.1$99.00$13.20$112

The lowest list price here is Claude Haiku 5.5 at $13.20. Gemini rows use the launch price and are for comparison; FUSR.ai does not route to Gemini.

Caching changes the order

Because coding tools resend the same files every turn, much of the input can come from the cache. With 70 in 100 input tokens cached, Sonnet 5.5 goes from $264 to $132 a month. Cache discounts differ by provider, so the ranking moves.

ModelList price70 in 100 input tokens cachedBatch price
Claude Opus 5.5$528$265$264
Claude Sonnet 5.5$264$132$132
Claude Haiku 5.5$13.20$6.96$6.60
GPT-5.5$693$381$347
GPT-6.1 Sol$264$132$132
GPT-6.1 Terra$132$66.16$66.00
GPT-5 mini$37.95$22.36$18.98
Grok 4.7$238$134Not listed
Grok Build 0.1$112$56.76Not listed

Anthropic cache writes are left out, so the Claude cached rows are a floor.

When a bigger model is worth it

A cheap model that needs three tries costs more than a bigger one that gets it right once, and your time costs more than either. A pattern that works for many people: a small model for quick questions, renames, and tests, and a large one for multi file changes and hard bugs.

You can wire that up yourself, or point your editor at an AI API router that picks per request. Setting it up in Cursor is in how to use your own API key in Cursor.

Sources

Prices as of

List prices in US dollars per million tokens, standard tier, read from each provider's own pricing page. Providers change prices, so check the source before you set a budget. FUSR.ai connects Anthropic, OpenAI, and xAI keys. Google prices are here to compare; FUSR.ai does not route to Gemini.

Questions

Common questions

What is the cheapest good LLM API for coding?
It depends on the work. Small models handle renames, short edits, and questions about one file well and cost very little. Large changes across many files still go better on the bigger models. The cheapest setup is usually a mix: small models for small asks, a bigger one for the hard ones.
Why does cached input matter so much for coding?
Coding tools resend the same files, rules, and chat history on every request, so most input tokens repeat. Cached input costs a fraction of fresh input, so how well caching works can change the bill more than which model you pick.
Can I use my own API key in Cursor?
Yes, for chat models, on a paid Cursor plan. Our Cursor guide covers what your key pays for, what Cursor still charges, and the setup.
Can FUSR.ai help with coding costs?
Yes, if you use Anthropic, OpenAI, or xAI API keys. FUSR.ai takes your own keys, picks a model for each request, keeps prompt caching working, and caps spend per key. Your providers bill you directly and FUSR.ai adds nothing to token prices. It does not route to Gemini, and it does not use chat plans like Claude Pro or ChatGPT Plus.

Straight talk

What FUSR.ai does and doesn't do

It does

  • Works with Cursor, VS Code with Continue or Cline, Aider, and the terminal through one setup command.
  • Picks a connected Anthropic, OpenAI, or xAI model per request by rules you can read.
  • Uses your own API keys, billed by your providers at list price.

It doesn't

  • Work with chat plans like Claude Pro or ChatGPT Plus. A chat plan is not an API key.
  • Store your code or prompts. Routing never sees the prompt text.
  • Route to Gemini.

Try FUSR.ai with your own API keys.

Point your editor at FUSR.ai with your own API keys, and it picks the model for each request.

Set up from your terminal with npx fusrai setup, or start in the browser.

You bring your own API keys. Chat plans like Claude Pro or ChatGPT Plus are separate and FUSR.ai does not use them.