AI coding model cost tracker
What coding models cost per million tokens across Anthropic, OpenAI, Google, Mistral, DeepSeek, xAI, Z.ai, each price linked to the provider's own pricing page, and what one AI-written pull request costs on each model.
Prices last verified 2026-10-24.
| Provider | Model | Input / 1M | Cached input / 1M | Output / 1M | Per pull request | Notes |
|---|---|---|---|---|---|---|
| Anthropic | Claude Haiku 5.5 | $0.1 | $0.01 | $0.5 | $0.0143 | Prompts up to 100K tokens; longer prompts are $0.50 input and $2.50 output. |
| OpenAI | gpt-6-luna | $0.1 | $0.01 | $0.5 | $0.0143 | Short context (up to 272K input tokens); longer prompts are billed higher. |
| Mistral | Mistral Small 4 | $0.15 | — | $0.6 | $0.0297 | |
| DeepSeek | deepseek-flash | $0.3 | $0.006 | $1.2 | $0.0373 | Peak-hour rates; off-peak rates are half. |
| gemini-3.5-flash-lite | $0.3 | $0.03 | $2.5 | $0.0548 | ||
| Mistral | Codestral 25.08 | $0.3 | — | $0.9 | $0.0558 | |
| gemini-3.8-flash | $0.75 | $0.075 | $3.75 | $0.1069 | From 2027-01-01: $1.5 input, $7.5 output. | |
| xAI | grok-build-0.1 | $1 | $0.2 | $2 | $0.1140 | Prompts under 200K tokens; longer prompts are billed higher. |
| OpenAI | gpt-5.4-mini | $0.75 | $0.075 | $4.5 | $0.1159 | |
| Anthropic | Claude Haiku 4.5 | $1 | $0.1 | $5 | $0.1425 | |
| DeepSeek | deepseek-v4-pro | $1.32 | $0.044 | $3.96 | $0.1498 | Peak-hour rates; off-peak rates are half. |
| Mistral | Mistral Large 4 | $1.36 | $0.14 | $4.18 | $0.1627 | |
| Z.ai | GLM-5.3 | $1.4 | $0.26 | $4.4 | $0.1773 | |
| gemini-2.5-pro | $1.25 | $0.125 | $10 | $0.2231 | Prompts up to 200K tokens; longer prompts are billed higher. | |
| xAI | grok-4.7 | $2 | $0.5 | $6 | $0.2595 | Prompts under 200K tokens; longer prompts are billed higher. |
| Anthropic | Claude Sonnet 5.5 | $2 | $0.1 | $10 | $0.2775 | |
| gemini-4-argon | $2 | $0.1 | $10 | $0.2775 | Implicit caching only. From 2026-12-01: $4 input, $20 output. | |
| OpenAI | gpt-6.1-sol | $2 | $0.1 | $10 | $0.2775 | Short context (up to 272K input tokens); longer prompts are billed higher. |
| gemini-3.1-pro-preview | $2 | $0.2 | $12 | $0.3090 | Prompts up to 200K tokens; longer prompts are billed higher. | |
| OpenAI | gpt-5.3-codex | $1.75 | $0.175 | $14 | $0.3124 | |
| Mistral | Mistral Medium 3.5 | $1.5 | — | $7.5 | $0.3150 | |
| Anthropic | Claude Sonnet 4.6 | $3 | $0.3 | $15 | $0.4275 | |
| Anthropic | Claude Opus 5.5 | $4 | $0.2 | $20 | $0.5550 | |
| Anthropic | Claude Fable 5.1 | $10 | $0.25 | $50 | $1.3688 | |
| OpenAI | gpt-6-astra | $10 | $1 | $50 | $1.4250 | Short context (up to 272K input tokens); longer prompts are billed higher. |
US dollars, standard tier. Each model name links to the pricing page it was read from. Per pull request: 150,000 input tokens (50% from cache) and 12,000 output tokens, an assumption you can change.
Download the data as CSV (CC BY 4.0).
How the prices are collected
- Every price is read from the provider's official pricing page or model card, linked from the model's name, and the whole table was last checked on 2026-10-24. We re-check it weekly; after 14 days without a check, the notice above the table says the prices may be stale.
- Standard, pay-as-you-go prices only: no batch discounts, no regional or data-residency uplifts, no promotional rates. A model whose page didn't show a clear price was left out rather than estimated.
- Cached input is the price of input tokens read from the provider's prompt cache. Some providers also charge to write to the cache, or for cache storage per hour; those aren't in the table.
- Several providers charge more once a single request's prompt passes a size threshold (the notes say which). The table shows the lower tier, so it assumes each model call stays under it.
- DeepSeek's rates are its peak-hour rates; off-peak, they're half. A price change a provider has already announced is shown in the notes and takes over in the table on its date.
How the pull request cost is calculated
The cost of a pull request uses the same arithmetic as the AI coding cost calculator, for one session:
- Input cost = (input tokens × (1 − cached share) + input tokens × cached share × cached price ÷ input price) ÷ 1,000,000 × input price.
- Output cost = output tokens ÷ 1,000,000 × output price.
- Per pull request = input cost + output cost. A model with no published cached price is charged the full input price for every input token.
The default pull request is an assumption: one agent session with 150,000 input tokens, 50% of them from the cache, and 12,000 output tokens, the calculator's example session. It is not measured from real pull requests. Agent sessions on large changes can use many times more input, because every model call resends the conversation so far; enter your own numbers above.
Worked example, Claude Sonnet 5.5 at $2 input, $0.1 cached and $10 output per million tokens:
- Input: 75,000 tokens at $2 per million = $0.1500, plus 75,000 cached tokens at $0.1 = $0.0075.
- Output: 12,000 tokens at $10 per million = $0.1200.
- Per pull request: $0.1500 + $0.0075 + $0.1200 = $0.2775.
Turn the cached share down to 0 and the same pull request costs $0.4200: on agent workloads, prompt caching and output price usually matter more than the headline input price. For the background, read How much does AI coding cost, and how do you control it? and our post What an AI-written pull request really costs, model by model.
From a price table to a budget
In AI CodeOps every model call is metered as it happens, and each session's page shows what it actually cost, step by step. Workspaces set budgets with a soft limit that warns and a hard limit that stops new sessions and running ones before their next model call. See cost controls and model tiers.
Cite this
AI CodeOps (2026). AI coding model cost tracker. https://aicodeops.dev/tools/ai-model-cost-tracker
The data and charts on this page are licensed CC BY 4.0: reuse them anywhere, with a link back to this page.
Embed it
<iframe src="https://aicodeops.dev/tools/ai-model-cost-tracker?embed=1" title="AI coding model cost tracker" width="100%" height="640" style="border:0" loading="lazy"></iframe> <p><a href="https://aicodeops.dev/tools/ai-model-cost-tracker">AI coding model cost tracker</a> by <a href="https://aicodeops.dev/">AI CodeOps</a></p>
Frequently asked questions
Where do the prices come from?
From each provider's own pricing page, linked in every row, read on the date shown as last verified. Standard tier, in US dollars per million tokens, without batch discounts, regional uplifts or promotional rates. A model whose page didn't show a clear price is left out.
How often is it updated?
We re-check the prices weekly. If the data is more than 14 days old, the page says so at the top: check the provider's page before relying on a price.
What is a typical pull request here?
An assumption, not a measurement: one agent session with 150,000 input tokens, half of them read from the prompt cache, and 12,000 output tokens, the same example session as our AI coding cost calculator. Change the numbers to match your own work and every row updates.
Why is cached input sometimes missing?
Some pricing pages don't publish a cached-input price for a model. For those, the per-PR cost charges every input token at the full input price.
Can I reuse the table?
Yes. The data is licensed CC BY 4.0: reuse it anywhere with a link back to this page. Download the CSV, or embed the live table with the code under Cite this.