Chat & LLM
LLM API pricing: GPT, Claude, Gemini, DeepSeek compared
Compare LLM API pricing for GPT, Claude, Gemini, DeepSeek, Grok and Kimi per 1M tokens, with worked monthly cost examples and practical ways to cut the bill.
"How much does the Claude API cost?" has no single answer, because nobody pays per request. A language model API bills tokens, and it bills them at two or three different rates depending on which way they travel. The same chatbot can cost $2 a month on one model and $60 on another, and the ranking between two models can flip once you turn on prompt caching.
This guide puts the current prices of every chat model in the API Stock catalogue side by side — GPT, Claude, Gemini, DeepSeek, Grok, Kimi and a few others — then works through three realistic workloads so you can see what the per-token numbers mean for a monthly bill. It is written for developers choosing a model for a product, and for anyone who has searched "Gemini API price" and found a table without a single worked example.
What you actually pay for
Every price below is quoted per 1 million tokens, in USD. A token is a piece of a word; a page of English prose is a few hundred of them. Three rates matter:
- Input tokens — everything you send: the system prompt, the conversation history, retrieved documents and the user's message. Resending the whole history on every turn is why input usually dominates a chat workload.
- Output tokens — everything the model writes back. Output is always the more expensive direction: across this catalogue it costs 2 to 6 times the input rate of the same model.
- Cached input — the part of the prompt the provider has already seen and stored. Where a model has a cache rate, a cached token is billed at a small fraction of the normal input price, usually a tenth. Some models also list a cache-write rate, charged once when a prefix is first stored.
So the bill for a month is simply
input × input rate + output × output rate + cached × cache rate + cache writes × cache-write rate, divided by
a million. The rest of this guide is that formula applied with real numbers.
LLM API prices at a glance
Catalogue prices checked on 24 September 2026, USD per 1M tokens, sorted by input price. Figures with more decimals in the catalogue are rounded to the cent. Each model page carries the live price table, and the pricing page lists every model in one place.
| Model | Family | Input | Output | Cached input |
|---|---|---|---|---|
| DeepSeek V4 Flash | DeepSeek | $0.168 | $0.336 | — |
| GPT 5.6 Luna | GPT | $0.18 | $1.08 | $0.018 |
| Claude Sonnet 5 | Claude | $0.30 | $1.50 | $0.03 |
| Qwen3.7 Plus | Qwen | $0.34 | $1.37 | $0.034 |
| MiniMax M3 | MiniMax | $0.36 | $1.44 | $0.036 |
| DeepSeek V4 Pro | DeepSeek | $0.522 | $1.044 | — |
| GPT 5.6 Terra | GPT | $0.80 | $4.80 | $0.08 |
| Gemini 3.6 Flash | Gemini | $0.90 | $4.50 | $0.09 |
| Gemini 3.7 Flash | Gemini | $0.90 | $4.50 | $0.09 |
| Gemini 3.5 Flash | Gemini | $0.90 | $5.40 | $0.09 |
| GLM 5.2 | GLM | $0.98 | $3.43 | $0.098 |
| Kimi K2.7 Code | Kimi | $1.11 | $4.62 | $0.111 |
| GPT 5.5 | GPT | $1.50 | $9.00 | $0.15 |
| Claude Fable 5 | Claude | $1.50 | $7.50 | $0.15 |
| Gemini 3.5 Flash (High) | Gemini | $1.62 | $9.72 | $0.162 |
| GLM 5.3 | GLM | $1.68 | $5.28 | $0.312 |
| Grok 4.5 | Grok | $2.10 | $6.30 | $0.525 |
| Grok 4.6 | Grok | $2.10 | $6.30 | $0.525 |
| GPT 5.6 Sol | GPT | $3.00 | $18.00 | $0.30 |
| Claude Opus 5 | Claude | $3.00 | $15.00 | $0.30 |
| Kimi K3 | Kimi | $3.15 | $15.75 | $0.315 |
| GPT 6 Astra | GPT | $8.00 | $40.00 | $0.80 |
A dash means the catalogue lists no cached-input rate for that model, so every input token is billed at the full input price. These are API Stock's prices, separate from each vendor's own direct pricing.
Which line, and when
A price table ranks models by cost, not by fit. The notes below stick to what the numbers say about each line; which model writes the answer you need is something to test on your own prompts.
GPT spans the widest range of any family here: input on GPT 6 Astra costs more than forty times what it does on GPT 5.6 Luna. Luna, at $0.18 in and $1.08 out, is described in the catalogue as the high-volume tier for chat, classification and lightweight agent steps. Terra sits below GPT 5.5 on both input and output, so for a new integration it is the cheaper mid-range choice. Output runs at 6× input on the 5.5 and 5.6 models and 5× on Astra — keep answers short on GPT and the saving is large. Cached input is a tenth of the input rate across the line.
Claude has three models, and Claude Sonnet 5 is by far the cheapest: $0.30 in, $1.50 out. Claude Opus 5 costs exactly ten times as much on both sides, which makes routing — Sonnet by default, Opus for the hard cases — worth building from day one. Claude Fable 5, tuned for long-form writing, sits in between at $1.50 / $7.50. Output is 5× input on all three, cached reads are a tenth of input, and a cache write costs 1.25× input. Sonnet and Opus answer on both the OpenAI-compatible and the Anthropic-compatible endpoint; Fable is served through the Anthropic-compatible Messages endpoint.
Gemini keeps input flat: every Flash model costs $0.90 per million input tokens. The difference is output — 3.6 Flash and 3.7 Flash charge $4.50, 3.5 Flash $5.40. The High variant pins 3.5 Flash to a large reasoning budget and costs 1.8× the standard 3.5 Flash on every rate. If you are choosing between Gemini versions on price alone, 3.6 and 3.7 Flash are the same. Cached input is a tenth of input.
DeepSeek has the cheapest tokens in the catalogue. DeepSeek V4 Flash costs $0.168 in and $0.336 out, and its output is only 2× its input — the smallest gap of any model here, so it stays cheap even when answers run long. V4 Pro costs about three times as much, but its $1.044 output rate is still below GPT 5.6 Luna's. The catch is caching: the catalogue lists no cache rate for either DeepSeek model, which matters for prompt-heavy workloads (see the second example below).
Grok prices Grok 4.5 and Grok 4.6 identically at $2.10 / $6.30, so there is no cost reason to stay on 4.5. Output is only 3× input, but the cache discount is smaller than elsewhere: a cached token costs a quarter of the input rate ($0.525), not a tenth. Both are listed with a 500K-token context.
Kimi has a frontier model and a coding tier. Kimi K3 is priced close to Claude Opus 5 ($3.15 / $15.75). Kimi K2.7 Code, built for repository-scale edits, is about a third of that, and it bills cache writes at the same low rate as cache reads ($0.111), so storing a large repository context is not penalised.
The rest of the catalogue fills the gap between DeepSeek and the mid-range: Qwen3.7 Plus and MiniMax M3 cost roughly $0.35 in and $1.40 out, while GLM 5.2 and GLM 5.3 cost $0.98–$1.68 in and $3.43–$5.28 out.
Worked cost examples
Three workloads, costed at the catalogue rates above. Totals cover token charges only.
1. A customer-support bot
5,000 conversations a month, each sending about 2,000 input tokens (system prompt, history, the customer's message) and receiving about 400 tokens of answer. That is 10M input + 2M output tokens.
On Claude Sonnet 5 the arithmetic is 10 × $0.30 + 2 × $1.50 = $3.00 + $3.00.
| Model | Input | Output | Month |
|---|---|---|---|
| DeepSeek V4 Flash | $1.68 | $0.67 | $2.35 |
| GPT 5.6 Luna | $1.80 | $2.16 | $3.96 |
| Claude Sonnet 5 | $3.00 | $3.00 | $6.00 |
| DeepSeek V4 Pro | $5.22 | $2.09 | $7.31 |
| GPT 5.6 Terra | $8.00 | $9.60 | $17.60 |
| Gemini 3.7 Flash | $9.00 | $9.00 | $18.00 |
| Grok 4.6 | $21.00 | $12.60 | $33.60 |
| Claude Opus 5 | $30.00 | $30.00 | $60.00 |
Even at five input tokens for every output token, output is half or more of the bill on GPT, Claude and Gemini. DeepSeek V4 Flash has the lowest rate on both sides, so it leads comfortably.
2. An assistant with a large fixed prompt
A product assistant answers 10,000 questions a month. Every request sends the same 1,600-token block — instructions plus a reference pack — followed by about 400 tokens of question and history, and gets a 100-token answer. With prompt caching on, that is 16M cached + 4M fresh input + 1M output.
On Claude Sonnet 5: 16 × $0.03 + 4 × $0.30 + 1 × $1.50 = $0.48 + $1.20 + $1.50.
| Model | Cached | Fresh input | Output | With cache | Without cache |
|---|---|---|---|---|---|
| GPT 5.6 Luna | $0.29 | $0.72 | $1.08 | $2.09 | $4.68 |
| Claude Sonnet 5 | $0.48 | $1.20 | $1.50 | $3.18 | $7.50 |
| DeepSeek V4 Flash | — | $3.36 | $0.34 | $3.70 | $3.70 |
| GPT 5.6 Terra | $1.28 | $3.20 | $4.80 | $9.28 | $20.80 |
| Gemini 3.7 Flash | $1.44 | $3.60 | $4.50 | $9.54 | $22.50 |
| Grok 4.6 | $8.40 | $8.40 | $6.30 | $23.10 | $48.30 |
| Claude Opus 5 | $4.80 | $12.00 | $15.00 | $31.80 | $75.00 |
This is where the ranking flips. Without caching DeepSeek V4 Flash would be cheapest; with it, GPT 5.6 Luna and Claude Sonnet 5 both undercut it, because DeepSeek bills all 20M input tokens at the full rate. Caching cuts the bill by 55–58% on the GPT, Claude and Gemini models here, and by about 52% on Grok, where cached tokens cost a quarter rather than a tenth. The table leaves out the one-off cache-write charge on models that list one; for a prefix reused thousands of times it is a rounding error.
3. A batch summarisation job
You summarise 5,000 documents of about 8,000 tokens each into a 400-token brief. Each document is different, so there is nothing to cache: **40M input
- 2M output**.
| Model | Input | Output | Job |
|---|---|---|---|
| DeepSeek V4 Flash | $6.72 | $0.67 | $7.39 |
| GPT 5.6 Luna | $7.20 | $2.16 | $9.36 |
| Claude Sonnet 5 | $12.00 | $3.00 | $15.00 |
| Qwen3.7 Plus | $13.72 | $2.74 | $16.46 |
| MiniMax M3 | $14.40 | $2.88 | $17.28 |
| DeepSeek V4 Pro | $20.88 | $2.09 | $22.97 |
| GPT 5.6 Terra | $32.00 | $9.60 | $41.60 |
| Gemini 3.7 Flash | $36.00 | $9.00 | $45.00 |
Input is 20 times output here, so the input rate decides almost everything. Run a sample of a hundred documents through two or three candidates, compare the summaries, and multiply out before committing the whole batch.
How to cut the bill
- Turn on prompt caching for anything repeated. Put the stable part of the prompt — instructions, tool definitions, reference material — first and the changing part last, so the prefix is identical from one request to the next. Cached tokens are billed at the model's cache rate wherever it has one. Coding agents and multi-turn chats, which resend a growing context on every step, gain the most.
- Cap the output. Output is the expensive direction, so set
max_tokensand ask for the format you need: a label, a JSON object, three bullet points. A model asked for "a short answer" still decides what short means. - Draft cheap, finish expensive. Use a low-cost tier — DeepSeek V4 Flash, GPT 5.6 Luna, Claude Sonnet 5 — for classification, extraction, first drafts and routing, and send only the requests that need it to Opus, Sol or Astra. At a 10× price gap, a router that escalates one request in ten still costs well under half of sending everything to the top model.
- Trim what you resend. Summarise old turns instead of replaying the full history, and retrieve fewer, better chunks. Every token you do not send is a token you do not pay for, cached or not.
- Compare on your own traffic. The worked examples show that the
cheapest model depends on the input/output mix and on caching. Log
usagefrom a day of real requests and cost it against two or three models.
Calling any of them with one key
Every model in the table runs on one API Stock key and one prepaid balance — the same balance that pays for video, image and music generation. There is no subscription and no per-vendor account: you top up, and each request is charged for the tokens it used. If a provider fails, the request is retried on a reserve provider, and a request that fails everywhere is refunded.
The OpenAI-compatible endpoint is POST /api/v1/chat/completions. With the
official OpenAI SDK, point the base URL at API Stock and use your API Stock
key; switching models is changing the model string.
import OpenAI from "openai";const client = new OpenAI({apiKey: process.env.API_STOCK_KEY,baseURL: "https://api.api-stock.com/api/v1",});const completion = await client.chat.completions.create({model: "deepseek-v4-flash", // or "gpt-5.6-luna", "claude-sonnet-5", "gemini-3.7-flash"…max_tokens: 300,messages: [{ role: "system", content: "You are a concise support assistant." },{ role: "user", content: "How do I reset my password?" },],});console.log(completion.choices[0].message.content);console.log(completion.usage); // the token counts the request is billed on
The Anthropic-compatible endpoint is POST /api/v1/messages. It takes the
Anthropic request format, where max_tokens is required:
curl -X POST https://api.api-stock.com/api/v1/messages \-H "Authorization: Bearer $API_STOCK_KEY" \-H "Content-Type: application/json" \-d '{"model": "claude-sonnet-5","max_tokens": 300,"messages": [{ "role": "user", "content": "How do I reset my password?" }]}'
Parameters, streaming and error handling are in the Chat Completions reference and the Messages reference. Before going live, the production checklist covers key handling and balance monitoring.
Frequently asked questions
How much does the Gemini API cost?
At catalogue rates, every Gemini Flash model costs $0.90 per million input tokens. Output is $4.50 per million on Gemini 3.6 and 3.7 Flash, $5.40 on 3.5 Flash and $9.72 on 3.5 Flash (High). Cached input is $0.09 per million ($0.162 on High). Live prices are on the Gemini family page.
How much does the Claude API cost?
Claude Sonnet 5 costs $0.30 per million input tokens and $1.50 per million output tokens, Claude Fable 5 $1.50 / $7.50, and Claude Opus 5 $3 / $15. Cached input is a tenth of the input rate on all three. See the Claude family page for the current table.
Is DeepSeek the cheapest LLM API?
Per token, yes: DeepSeek V4 Flash, at $0.168 in and $0.336 out, is the lowest-priced model in the catalogue. Once most of your prompt is cacheable, GPT 5.6 Luna and Claude Sonnet 5 can come out cheaper, because DeepSeek has no cache rate — the second worked example above shows by how much.
How do I get a Claude, Gemini or DeepSeek API key?
You do not need one per vendor. Sign up for API Stock, top up your balance by any amount and create an API key in the dashboard. The same key calls GPT, Claude, Gemini, DeepSeek, Grok, Kimi and every other model in the catalogue.
Which LLM API is cheapest for my workload?
Multiply your monthly input, output and cached tokens by each candidate's rates, as in the examples above. Short prompts with long answers favour a low output rate; long repeated prompts favour a cheap cache rate; one-off long documents favour a low input rate. Start from the pricing page and the family pages for GPT, Claude, Gemini, DeepSeek, Grok and Kimi.
Run this with your own key
Every model in this guide is live in the API Stock catalog — one API key, one prepaid balance, no separate signup per provider.