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. 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 https://platform.claude.com/docs/en/about-claude/pricing , OpenAI pricing https://developers.openai.com/api/docs/pricing . You can reproduce it in an LLM API cost calculator https://createchz.com/ai-costs/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 https://platform.claude.com/docs/en/build-with-claude/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 https://developers.openai.com/api/docs/guides/batch . 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 https://createchz.com/ai-costs/openai-api-pricing/ alongside the other providers.