LLM prices / Cheapest / Coding agent
AI API prices · 29 models fit · checked Oct 23, 2026
Cheapest LLM for coding
Short answerClaude Haiku 5.5 and GPT-6 Luna tie for the cheapest current model for a coding-agent step at $2.30 per 1,000, with the repeated 30,000 tokens billed at the cache-read price. At 3,000 a month that is $6.90. Next: GPT-5.6 Luna at $5.00 and DeepSeek Flash at $5.58 per 1,000. 29 of 29 current models fit this job. Ranked by cost only; we don't score quality.

Every model that fits, cheapest first
One coding-agent step = 40,000 tokens of repo context and history, 30,000 of them repeated from the last step and billed at the cache-read price, 2,000 tokens out, tool calling required. Each model is billed the cheapest way its price list allows.
| # | Model | Per 1,000 | 3,000 a month | 30,000 a month | Billed | Context |
|---|---|---|---|---|---|---|
| 1 | Claude Haiku 5.5Anthropic | $2.30 | $6.90 | $69.00 | cached | 1M |
| 2 | GPT-6 LunaOpenAI | $2.30 | $6.90 | $69.00 | cached | 1.05M |
| 3 | GPT-5.6 LunaOpenAI | $5.00 | $15.00 | $150 | cached | 1.05M |
| 4 | DeepSeek FlashDeepSeek | $5.58 | $16.74 | $167 | cached | 1M |
| 5 | Gemini 3.1 Flash-LiteGoogle | $6.25 | $18.75 | $188 | cached | 1.05M |
| 6 | Gemini 3.5 Flash-LiteGoogle | $8.90 | $26.70 | $267 | cached | 1.05M |
| 7 | Gemini 3 Flash PreviewpreviewGoogle | $12.50 | $37.50 | $375 | cached | 1.05M |
| 8 | Gemini 3.8 FlashGoogle | $17.25 | $51.75 | $518 | cached | 1.05M |
| 9 | Gemini 3.6 FlashGoogle | $17.25 | $51.75 | $518 | cached | 1.05M |
| 10 | GPT-5.4 miniOpenAI | $18.75 | $56.25 | $562 | cached | 400K |
| 11 | DeepSeek V4 ProDeepSeek | $22.44 | $67.32 | $673 | cached | 1M |
| 12 | Claude Sonnet 5.5Anthropic | $43.00 | $129 | $1,290 | cached | 1M |
| 13 | GPT-6.1 SolOpenAI | $43.00 | $129 | $1,290 | cached | 1.05M |
| 14 | Gemini 4 ArgonGoogle | $43.00 | $129 | $1,290 | cached | 1.05M |
| 15 | GPT-6 SolOpenAI | $46.00 | $138 | $1,380 | cached | 1.05M |
| 16 | GPT-5.6 TerraOpenAI | $50.00 | $150 | $1,500 | cached | 1.05M |
| 17 | Gemini 3.1 Pro PreviewpreviewGoogle | $50.00 | $150 | $1,500 | cached | 1.05M |
| 18 | GPT-5.2OpenAI | $50.75 | $152 | $1,522 | cached | 400K |
| 19 | GPT-5.4OpenAI | $62.50 | $188 | $1,875 | cached | 1.05M |
| 20 | Claude Opus 5.5Anthropic | $86.00 | $258 | $2,580 | cached | 1M |
| 21 | GPT-5.6 SolOpenAI | $92.00 | $276 | $2,760 | cached | 1.05M |
| 22 | GPT-5.5OpenAI | $125 | $375 | $3,750 | cached | 1.05M |
| 23 | chat-latestOpenAI | $125 | $375 | $3,750 | cached | 400K |
| 24 | Claude Fable 5.1Anthropic | $208 | $622 | $6,225 | cached | 1M |
| 25 | GPT-6 AstraOpenAI | $230 | $690 | $6,900 | cached | 1.05M |
| 26 | GPT-5.6 CyberOpenAI | $312 | $938 | $9,375 | cached | 400K |
| 27 | GPT-5.2 ProOpenAI | $1,176 | $3,528 | $35,280 | standard | 400K |
| 28 | GPT-5.5 ProOpenAI | $1,560 | $4,680 | $46,800 | standard | 1.05M |
| 29 | GPT-5.4 ProOpenAI | $1,560 | $4,680 | $46,800 | standard | 1.05M |
What moves the answer
- Caching decides it. 30,000 of the 40,000 input tokens repeat every step, so cache-read prices matter more than list prices: 10 of the top 10 are cheapest with caching on. Without caching the winner would be Claude Haiku 5.5 at $5.00 per 1,000.
- Input price matters most here. The job reads 20x more than it writes, so the input (and cache-read) price drives the bill.
- Watch long prompts. 13 of these models charge more once a prompt passes a size threshold (for example Claude Haiku 5.5 above 100,000 tokens); this job stays under it, a bigger one may not.
Method
Prices: each provider's own pricing page, checked Oct 23, 2026. Fits: current on the provider's model page (not deprecated, legacy or shut down), lists tool calling, and a context window that holds the request; checked Oct 24, 2026. Cache writes are not counted. This page ranks price only; quality on your task is a separate test. People search for this: Google suggests "cheapest llm for coding".