cd /news/large-language-models/what-an-llm-api-call-really-costs-th… · home › topics › large-language-models › article
[ARTICLE · art-169337] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=· neutral

What an LLM API call really costs: the formula and four levers that move the bill

A developer published a formula and worked examples showing how LLM API bills are driven by input and output token counts, caching, batch pricing and long-context surcharges. Using Claude Sonnet 5.5 and GPT-6.1 Sol at $2 per million input and $10 per million output tokens, a support bot handling 1,000 requests a day at 1,500 input and 400 output tokens costs $210 a month, dropping to $105 with batch pricing and to $120.72 for a 10,000-token cached prompt. Across 65 models, output prices run 1.0x to 10.0x input prices with a median of 5.0x, and on Sonnet 5.5 output is about 21% of tokens but 57% of cost.

by read2 min views2 publishedNov 14, 2026

Prices are quoted per million tokens, but the bill depends on how many tokens you send, how many you get back, and which pricing rules apply. Figures below were checked against the providers' own pages on 13 November 2026.

cost = input_tokens / 1e6 * input_price + output_tokens / 1e6 * output_price, times requests per day, times 30. A support bot sending 1,500 input and 400 output tokens, 1,000 times a day, on Claude Sonnet 5.5 ($2 in, $10 out per million) costs $210.00 a month; GPT-6.1 Sol lists the same prices (Anthropic pricing, OpenAI pricing). You can reproduce it in an LLM API cost calculator.

Across 65 models in our price table, output is 1.0x to 10.0x the input price, with a median of 5.0x. On Sonnet 5.5 a chat turn is about 21% output by tokens but 57% of the cost, so trimming replies usually saves more than trimming prompts.

Cached reads cost 0.1x the input price on most Claude models and on GPT-5.6 and later, and 0.05x on models such as Sonnet 5.5 and GPT-6.1 Sol; writing a cache entry costs 1.25x (Anthropic prompt caching). For a 10,000-token fixed prompt at 1,000 requests a day, our worked example falls from $690.00 to $120.72 a month. Minimum prompt lengths apply, so short system prompts will not cache.

Anthropic, OpenAI and Google charge 50% less for jobs that can wait up to a day (OpenAI Batch API). The chatbot above falls from $210 to $105 a month.

OpenAI steps up above 272K input tokens, Gemini 3.1 Pro and Grok above 200K, Claude Haiku 5.5 above 100K. A 300K-token prompt costs about $0.61 on Sonnet 5.5 and $6.08 on GPT-6 Astra (our arithmetic from the published prices).

On three reference workloads, Sonnet 5.5 and GPT-6.1 Sol cost the same; the small tier (Haiku 5.5 or GPT-6 Luna) costs $10.50, $9.00 and $8.52 a month, and flagships run 2 to 3 times the mid tier. Run the same 50 to 100 real prompts through each candidate and divide cost by passing answers. The full table is in this OpenAI API pricing breakdown alongside the other providers.

── more in #large-language-models 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/what-an-llm-api-call…] indexed:0 read:2min 2026-11-14 · —