AI model prices for coding agents
What each model costs through its API, how much context it takes and which AI agents can run it. Prices are per million tokens in US dollars, from LiteLLM's open price list, refreshed daily; each model page links to the provider's own pricing page.
| Model | Input | Cached | Output | Example task | Context | Agents |
|---|---|---|---|---|---|---|
Claude Fable 5.1Anthropic · frontier |
$10 | $0.25 | $50 | $15 | 1M | 155 |
GPT-6 AstraOpenAI · frontier |
$10 | $1 | $50 | $15 | 922K | 153 |
Claude Opus 5.5Anthropic · frontier |
$4 | $0.20 | $20 | $6 | 1M | 155 |
Kimi K3Moonshot AI · frontier |
$3 | $0.30 | $15 | $4.5 | 1M | 116 |
GPT-5.6 TerraOpenAI · mid |
$2 | $0.20 | $12 | $3.2 | 922K | 153 |
Gemini 3.1 Pro (preview)Google · mid |
$2 | $0.20 | $12 | $3.2 | 1M | 150 |
Claude Sonnet 5.5Anthropic · mid |
$2 | $0.10 | $10 | $3 | 1M | 155 |
GPT-6.1 SolOpenAI · mid |
$2 | $0.10 | $10 | $3 | 922K | 153 |
Mistral Medium 3.5Mistral AI · mid |
$1.5 | $0.15 | $7.5 | $2.25 | 262K | 109 |
Grok 4.7xAI · mid |
$2 | $0.50 | $6 | $2.6 | 524K | 120 |
Qwen3.8 MaxAlibaba (Qwen) · mid |
$2 | $0.25 | $6 | $2.6 | 992K | 117 |
GLM-5.3Z.ai · mid |
$1.4 | $0.26 | $4.4 | $1.84 | 1M | 105 |
Kimi K2.7 CodeMoonshot AI · mid |
$0.95 | $0.19 | $4 | $1.35 | 262K | 116 |
DeepSeek V4 ProDeepSeek · mid |
$1.32 | $0.04 | $3.96 | $1.72 | 1M | 124 |
Gemini 3.8 FlashGoogle · mid |
$0.75 | $0.07 | $3.75 | $1.12 | 1M | 150 |
Grok Code Fast 1xAI · fast |
$1 | $0.20 | $2 | $1.2 | 256K | 120 |
DeepSeek V4 FlashDeepSeek · fast |
$0.30 | $0.01 | $1.2 | $0.42 | 1M | 124 |
MiniMax M3MiniMax · fast |
$0.30 | $0.06 | $1.2 | $0.42 | 1M | 105 |
MiMo V2.6 ProXiaomi (MiMo) · fast |
$0.43 | $0.00 | $0.87 | $0.52 | 1M | 105 |
Mistral Small (2603)Mistral AI · fast |
$0.15 | $0.01 | $0.60 | $0.21 | 262K | 109 |
Claude Haiku 5.5Anthropic · fast |
$0.10 | $0.01 | $0.50 | $0.15 | 1M | 155 |
GLM-5.3 FlashZ.ai · fast |
$0.15 | $0.03 | $0.50 | $0.20 | 1M | 105 |
GPT-6 LunaOpenAI · fast |
$0.10 | $0.01 | $0.50 | $0.15 | 922K | 153 |
Qwen3.8 FlashAlibaba (Qwen) · fast |
$0.15 | $0.02 | $0.47 | $0.20 | 992K | 117 |
MiMo V2.6 FlashXiaomi (MiMo) · fast |
$0.14 | $0.00 | $0.28 | $0.17 | 1M | 105 |
"Example task" is a rough yardstick: 1 million input tokens plus 100,000 output tokens, about one long agent session on a mid-size codebase, without prompt caching. Coding agents re-send context on every step, so cached-input prices matter: most agents cache automatically. Tiers: frontier = $15+ per million output tokens, mid = $3-15, fast = under $3.
How people combine models
A common setup is a strong model for planning and review and a fast, cheap one for the edits in between. In Claude Code that can be a frontier model in plan mode and a smaller model for subagents; in agents that take any provider (OpenCode, Cline, Aider and others) you pick a model per role. Compare the "Example task" column within each tier to see what the switch saves, and check each model page for the agents that support it.
Subscription plans (Claude Pro and Max, ChatGPT plans, Cursor, Copilot) bill differently: you pay a monthly fee with usage limits instead of per token. See agent pricing for those.
Voice and real-time models
Speech-to-speech models and voices are billed per minute or per audio token, so they are not in the token table above. These come from the voice APIs on AgentGid; for a whole phone agent with the cost of a call minute, see the voice agent recipe.
| Cartesia | Low-latency text-to-speech (Sonic), speech-to-text (Ink) and managed voice agents. TTS: Pro $5 for 100K credits, about 133 TTS minutes as listed = about $0.0376/min. Telephony $0.014/min (AgentGid conversion from the listed price) |
|---|---|
| Deepgram | Real-time and batch speech-to-text, text-to-speech and voice-agent APIs. STT: Nova-3 streaming $0.0077/min pay as you go. TTS: Aura-2 $0.030 per 1k characters, at about 1,000 characters per minute of speech (AgentGid conversion from the listed price) |
| ElevenLabs | Text-to-speech, speech-to-text (Scribe), voice cloning and conversational voice-agent APIs. STT: Scribe v2 realtime $0.39/hour = $0.0065/min. TTS: Flash/Turbo $0.04 per 1K characters, at about 1,000 characters per minute of speech (AgentGid conversion from the listed price) |
| Fish Audio API | Generate speech from text with cloned or library voices, transcribe audio, and design voices. TTS: $15.00 per 1M UTF-8 bytes, at about 1,000 bytes per minute of English speech (AgentGid conversion from the listed price) |
| Murf API | Text-to-speech API (Falcon streaming and Gen2 models) with voice cloning, voice changer, translation, dubbing and a beta speech-to-text endpoint. TTS: Falcon $0.01 per minute; STT: $0.24 per hour of audio = $0.004/min (AgentGid conversion from the listed price) |
| OpenAI Realtime API | Speech-to-speech models for real-time voice agents, priced per 1M audio and text tokens. gpt-realtime-2.1: audio $32 in / $64 out per 1M tokens; gpt-realtime-2.1-mini: audio $10 / $20 |
| Retell AI | Platform and API for phone voice agents and chat agents, billed per minute or message. $0.07-$0.31/min for AI voice agents, depending on the voice, model and telephony chosen (AgentGid conversion from the listed price) |
| Rime | Text-to-speech and speech-to-text API built for voice agents. TTS: Mist v3 $0.03/min. STT $0.002/min from Nov 20, 2026 (AgentGid conversion from the listed price) |
| SONA (Sona PRO) | Text-to-speech API and Telegram bot with voice cloning, dubbing and multi-voice dialogues, plus AI image (Nano Banana) and video (Veo 3.1) generation from the same balance. TTS: $4 for 500,000 credits, 1 credit per character for standard voices (1.5 for SONA PRO and cloned voices), credits valid 30 days = $0.008 per 1K characters, at about 1,000 characters per minute of speech (AgentGid conversion from the listed price) |
| Typecast TTS API | Text-to-speech API with 600+ AI voices for websites, apps, games, and podcasts. TTS: $0.07 per 1,000 credits on Plus ($0.075 on Lite), 1 credit per character = $0.07 per 1K characters, at about 1,000 characters per minute of speech (AgentGid conversion from the listed price) |
| Ultravox | Speech-native voice AI model and API for real-time voice agents. $0.05 per minute for the speech-native model, after 30 free minutes (AgentGid conversion from the listed price) |
| Voice Me | Text-to-speech API and Telegram bot with 1,000+ voices in 44 languages, MP3 or WAV output and speed, volume and emotion control. TTS: $5 for 500,000 characters (premium voices use 1.5 times the characters) = $0.01 per 1K characters, at about 1,000 characters per minute of speech (AgentGid conversion from the listed price) |
How to read this LLM API pricing comparison
Each row shows what a model costs through its provider's API, per million tokens in US dollars: fresh input, cached input and output. The Context column is the largest input the model accepts, and Agents counts the tracked agents that can run it. Every column sorts, and each model page links to the provider's own pricing page, lists the agents that support the model, and shows the example task again with most of the input cached.
The tiers group models by output price, so frontier, mid and fast models are easy to tell apart. Compare within a tier first: two models at a similar price are the real alternatives to each other.
Input, cached and output tokens
A coding agent does not send one prompt. It works in a loop: read the instructions, the tool list and the relevant files, decide on an action, run a tool, read the result, and repeat. Every step sends the whole conversation so far as input. That shapes what you pay:
- Input is usually most of the tokens in an agent session, because the same context is sent again on every step.
- Cached input is the repeated part of that context, billed at a fraction of the input price when the provider caches it. Most coding agents cache automatically, which is why the cached price matters more than the headline input price.
- Output is the code, plans and tool calls the model writes. It costs several times more per token than input, but there is much less of it. Reasoning models also bill their thinking as output.
How to estimate an agent task's cost
The Example task column is a yardstick: one million input tokens plus one hundred thousand output tokens, about one long agent session on a mid-size codebase, priced without caching. To estimate your own work:
- Count sessions, not prompts. A short fix may use a small share of the yardstick; a long refactor can use several.
- Assume most input is cached in a long session and price it with the cached column; the model pages show this case.
- Add output at the output price, and remember that retries repeat the whole loop.
- Multiply by sessions per day and working days.
A common way to cut the bill is to mix models: a stronger model to plan and review, a fast one for the edits in between. If your estimate comes out above a monthly plan, a subscription may be cheaper; check agent pricing, usage limits and the limits calculator.
Where the prices come from
Token prices come from LiteLLM's open price list and are refreshed daily; each model page shows the date of the update and links to the provider's official pricing page. Check that page before you budget: it is the final word. See where prices and limits come from and the methodology.
Frequently asked questions
How is LLM API pricing calculated?
Per million tokens, with separate prices for input (what the model reads), cached input (repeated context the provider has stored) and output (what it writes). Output costs several times more than input, and cached input costs far less than fresh input.
What is cached input pricing?
When the start of a request repeats an earlier one, such as the system prompt, tool list and files an agent already read, providers can serve it from a cache at a much lower price. Coding agents re-send context on every step, so caching often decides the real cost of a session.
What is the cheapest LLM API for coding?
Sort the table by Example task: the fast tier is cheapest per session. The cheapest model is only a bargain if it finishes the task; a model that needs several retries or breaks tool calls can cost more in total than a mid-tier one.
Does a bigger context window cost more?
Not by itself: you pay for the tokens you actually send. But an agent that fills a large window pays for all of it on every step, so long contexts raise the cost per step unless the repeated part is cached.
Is the API cheaper than a subscription like Claude Max or ChatGPT Pro?
For heavy daily agent use a subscription is usually cheaper and easier to budget; for light or bursty use, paying per token can cost less. Compare a month of your sessions at API prices with the plan's price and limits.