
The parts of an API bill
| Line item | What it means | Example as listed 17 October 2026 |
|---|---|---|
| Input tokens | Everything you send: system prompt, history, documents, tool results | GPT-6.1 Sol USD 2.00 |
| Output tokens | The reply, plus reasoning tokens on thinking models | GPT-6.1 Sol USD 10.00 |
| Cache write | First time a reusable prefix is stored | Claude Sonnet 5.5 USD 2.50 (5-minute cache) |
| Cache hit | Later requests that reuse the stored prefix | Claude Sonnet 5.5 USD 0.10 |
| Batch rate | Asynchronous jobs; OpenAI and Anthropic return results within 24 hours | 50% off on OpenAI, Anthropic and Gemini |
| Length tier | Higher rates once a prompt passes a threshold | GPT-6 models above 272K input tokens |
| Time-of-day rate | Cheaper hours | DeepSeek off-peak is half the peak rate |
| Tool fees | Charges per search or other server tool call | Gemini Search grounding USD 14 per 1,000 after 5,000 free a month |
List prices on the same fields
| Model | Input | Output | Cached input | Batch |
|---|---|---|---|---|
| GPT-6 Astra | 10.00 | 50.00 | 1.00 | 50% off |
| GPT-6.1 Sol | 2.00 | 10.00 | 0.10 | 50% off |
| GPT-6 Luna | 0.10 | 0.50 | 0.01 | 50% off |
| Claude Sonnet 5.5 | 2.00 | 10.00 | 0.10 | 1.00 / 5.00 |
| Claude Haiku 5.5 | 0.10 (prompts up to 100K) | 0.50 | 0.01 | 0.05 / 0.25 |
| Gemini 3.8 Flash | 0.75 through 2026 | 3.75 through 2026 | 0.075 plus storage | 0.375 / 1.875 |
| DeepSeek V4.1 Flash | 0.30 peak, 0.15 off-peak | 1.20 peak, 0.60 off-peak | 0.006 peak | No batch tier listed |
| Grok 4.7 | 2.00 under 200K | 6.00 under 200K | 0.50 | Not supported |
Sources: OpenAI's GPT-6.1 Sol model page, Anthropic's pricing page, Google's Gemini API pricing, DeepSeek's models and pricing page and xAI's Grok 4.7 model page. Google lists Gemini 3.8 Flash doubling to USD 1.50 input and USD 7.50 output from 1 January 2027.
OpenAI listed GPT-6 Luna at USD 0.10 input and USD 0.50 output per 1M tokens on 17 October 2026, one hundredth of GPT-6 Astra's price.
How to estimate a monthly bill
- Pick one real task and collect 20 representative requests.
- Count tokens for each with the vendor's counter. As a rough guide, Google says 100 tokens are about 60 to 80 words.
- Split input into stable and variable parts. The stable part (system prompt, tool definitions, a shared document) is what caching can discount.
- Measure output length, including reasoning tokens, which Gemini and others bill as output.
- Multiply by monthly volume and by the list price for each line item.
- Add tool fees such as search grounding and any regional processing premium, which OpenAI lists at 10%.
- Check thresholds: OpenAI's 272K tier, Grok's 200K tier and Haiku 5.5's 100,000-token tier change the rate for the whole request.
- Rerun with the next cheaper tier and keep it if your quality test still passes.
Worked example: a support assistant
Assume 100,000 requests a month, each with 3,000 input tokens (a 2,000-token system prompt and help-center excerpt that never changes, plus 1,000 tokens of customer message and history) and 400 output tokens. That is 300M input and 40M output tokens a month.
| Setup | Monthly cost, list prices as listed 17 October 2026 |
|---|---|
| Claude Sonnet 5.5, no caching | 300M x 2.00 + 40M x 10.00 = USD 1,000 |
| Claude Sonnet 5.5, 2,000-token prefix cached | About USD 663 (USD 200 fresh input, USD 20 cache hits, about USD 43 for a cache rewrite every 5 minutes, USD 400 output) |
| GPT-6.1 Sol, no caching | USD 1,000 (same input and output rates as Sonnet 5.5) |
| Gemini 3.8 Flash, 2026 rates | USD 225 + USD 150 = USD 375 |
| DeepSeek V4.1 Flash, all peak hours | USD 90 + USD 48 = USD 138 |
| GPT-6 Luna or Claude Haiku 5.5 | USD 30 + USD 20 = USD 50 |
Caching cut the Sonnet bill by about a third with no change in model. Moving to a small model cut it by 95%, but only matters if the small model answers well enough. Our verdict: test the cheapest tier first for well-scoped support and extraction work, and reserve the mid tier for questions that need judgment.
If the same workload could wait for results, OpenAI's Batch API guide offers 50% lower costs with a 24-hour turnaround, and Anthropic's batch processing docs allow up to 100,000 requests per batch. Live chat cannot use batch; nightly tagging, summarizing and evaluation runs can.
How caching pays off
Anthropic's pricing page states a cache hit costs 10% of the standard input price and that caching "pays off after one cache read" for the 5-minute duration, whose write costs 1.25x input. OpenAI's Sol page lists cached input at 5% of the uncached rate and cache writes at 1.25x. Two rules follow:
- Put stable content first. Caches match from the start of the prompt, so a timestamp at the top breaks every hit.
- Keep traffic warm. A 5-minute cache expires between sparse requests; Anthropic sells a 1-hour cache at 2x input for those.
Common mistakes
- Comparing per-token prices across vendors as if tokens were equal. Anthropic notes its newer tokenizer produces about 30% more tokens for the same text, so compare cost per finished task.
- Forgetting reasoning tokens. A short visible answer can carry thousands of billed thinking tokens.
- Crossing a length tier by accident. One 300,000-token prompt on a GPT-6 model is billed at 2x input and 1.5x output for the whole request.
- Missing scheduled price changes. Gemini 3.8 Flash doubles on 1 January 2027 per Google's page.
- Paying full price for overnight jobs. Batch halves the cost at three of the five vendors here.
- Choosing by price alone. A cheap model that fails 20% of tasks costs more once you add retries and human review.
How we researched this
We read the pricing and model pages for each vendor listed above, plus OpenAI's batch and Anthropic's batch processing documentation, on 17 October 2026. Every figure is a published list price; enterprise discounts and regional rates vary. Model profiles in our model directory carry the same numbers. For how prompt length interacts with these tiers, see context windows explained, and for subscription plans rather than APIs, see free vs paid AI tools.
Frequently asked questions
Why do output tokens cost more than input tokens? Generating each output token takes a full model step, while input is processed in parallel. Every model in the table above lists output at 3 to 5 times the input price.
What is the cheapest AI API model right now? By list price, DeepSeek V4.1 Flash off-peak at USD 0.15 input and USD 0.60 output is among the lowest, alongside GPT-6 Luna and Claude Haiku 5.5 at USD 0.10 input and USD 0.50 output, as listed 17 October 2026.
Is prompt caching automatic? It depends on the vendor. OpenAI's prompt caching guide says caching is enabled by default for supported models, while Anthropic lets you mark cache breakpoints or turn on automatic caching.
How much does the Batch API save? Half the standard price on OpenAI, Anthropic and Gemini, as listed 17 October 2026. xAI lists batch as not supported for Grok 4.7.
Do I pay for tokens in failed or cut-off responses? Generally yes for tokens processed and generated. Set a sensible max output and catch errors early to limit waste.
Are consumer chat subscriptions billed by token? No, plans like Claude Pro are flat monthly fees with usage limits. Token billing applies to the developer APIs.
How do I compare two models fairly on cost? Run the same 20 to 50 real tasks through both, record total tokens and pass rate, and divide spend by tasks passed.