How to Compare LLM API Cost Per Million Tokens Before You Pick a Model A cost-comparison guide published by Startup Fortune advises teams to ignore list prices on LLM pricing pages and instead compute a blended price per million tokens from their own input-to-output ratio, caching share and retry rate. The guide's worked example shows a model with a 3x lower list price costing about 17% more per task on a chat workload and about 84% more on a document-heavy one, and notes Anthropic prices output at five times input across its tiers, with Claude Opus 4.5 at $5 per million input tokens and $25 per million output tokens. It recommends running 50 realistic requests through each candidate model and reading the API's usage block, since tokenizers can bill 10% to 20% more tokens for the same text, and pricing cached input separately because Anthropic charges 10% for cache reads. The price on the pricing page is a quote for a workload you don't run. Three numbers from your own logs decide what the bill will actually be. - Blended price per million tokens is input tokens x input price + output tokens x output price divided by total tokens, and it only means something with your own input-to-output ratio. - Output tokens usually cost several times more than input tokens, so a model that writes long answers can lose to a pricier model that writes short ones. - In the worked example, a model with a 3x lower list price costs about 17% more per task on a chat workload and about 84% more on a document-heavy one. - Cached input is billed at a fraction of the normal rate Anthropic charges 10% for cache reads , so a prompt-heavy product should price cached and uncached input separately. - Retries and reasoning tokens raise the real price, so the number to compare is cost per successful task, not cost per call. If you want to know how to compare LLM API cost per million tokens, start by ignoring the headline number on the pricing page. It describes a workload with no system prompt, no retries and no long answers, and nobody ships that product. Every provider lists input and output prices separately, and the gap between them is wide. Anthropic has long priced output at five times input across its model tiers, and most rivals sit somewhere in the same three-to-five-times range. So a founder who reads two columns of figures and picks the smaller one has compared two prices without comparing two bills. This is a guide to building the comparison that matters: a blended price from your own traffic, adjusted for caching and retries, expressed as the cost of one finished task. The arithmetic takes about twenty minutes and a spreadsheet. You need an average input token count per request, an average output token count, and the share of that input that repeats from one call to the next. Nothing else about your product matters yet. How to Calculate AI Agent Cost Per Task Before It Wrecks Your Margin https://startupfortune.com/how-to-calculate-ai-agent-cost-per-task-before-it-wrecks-your-margin/ Anthropic's Claude Opus 4.5 pricing runs $5 per million input tokens and $25 per million output, and retries on failed runs can cost more than the original attempt, turning a 70% success rate into roughly triple the cost of a 95% rate. - how to calculate AI agent cost per task https://startupfortune.com/how-to-calculate-ai-agent-cost-per-task-before-it-wrecks-your-margin/ - AI agent pricing model for startup margins https://startupfortune.com/how-to-calculate-ai-agent-cost-per-task-before-it-wrecks-your-margin/ If you're pre-launch, run fifty realistic requests through each candidate model and log the usage fields the API returns. Don't estimate from word counts. The same paragraph produces different token counts under different tokenizers, so a model that looks identical on a pricing page can bill you 10 to 20 percent more tokens for the same text. Use each provider's own token counter, or read the usage block in the response. The repeating share is the one founders forget. A support bot that sends a 2,000-token policy document with every question is paying to re-read the same text thousands of times a day. That repeated chunk is what caching exists for, and it's the reason a single blended figure hides so much. Then measure the output side honestly. Run the same fifty prompts on each model and count what comes back. Models differ a lot here. One will answer a classification prompt with a single word, another will explain itself for four sentences, and you pay for every one of those tokens at the output rate. The blended token price calculation Blended price is the average price you pay per million tokens once you weight input and output by how much of each you use. The formula is short: Blended price = input tokens x input price + output tokens x output price / input tokens + output tokens Say a request averages 3,000 input tokens and 400 output tokens, at $1.50 per million in and $6.00 per million out. The input costs $0.0045, the output costs $0.0024, the call costs $0.0069, and across 3,400 tokens that blends to about $2.03 per million. Neither list price is $2.03. Your blended price lives between the two, pulled toward whichever side you use more. That's why input vs output token pricing matters more than either figure alone. A document-summary product with a 20-to-1 input-to-output ratio lives almost entirely on the input price. A writing assistant that produces long drafts lives on the output price. Two startups can look at the same pricing page and need opposite models. How to Price AI Agent Seats With Variable Usage That Actually Holds https://startupfortune.com/how-to-price-ai-agent-seats-with-variable-usage-that-actually-holds/ The $40-a-seat coding agent example shows why: one developer costs $2 in inference, another running fifteen pull requests a day costs $100 or more on the identical seat. Intercom charges per resolution instead, while OpenAI and Anthropic bundle a seat with a metered usage pool. - how to price AI agent seats fairly https://startupfortune.com/how-to-price-ai-agent-seats-with-variable-usage-that-actually-holds/ - variable usage pricing for AI agent software https://startupfortune.com/how-to-price-ai-agent-seats-with-variable-usage-that-actually-holds/ Blended price per million tokens is still a flawed yardstick, because it shows what a token costs on average, not what a finished job costs. The cheaper model that costs more The prices below are illustrative, picked to show the mechanics. Swap in the current numbers from the providers you're considering before you decide anything. Model A is the bargain: $0.50 per million input tokens and $2.00 per million output. Model B costs three times as much on both lines, at $1.50 in and $6.00 out. B also discounts cached input to 10% of the normal rate, which is how Anthropic prices cache reads. A offers no cache discount. Our first workload is a customer-support assistant that sends 3,000 input tokens per request, 2,000 of them a fixed system prompt and policy text. In testing, B answers in about 400 tokens. A is chattier and takes about 1,200 for the same task. And in the same test, A's answers fail a format check and need a second call about 30 percent of the time, against 3 percent for B. Run A: input is 3,000 tokens at $0.50 per million, so $0.0015. Output is 1,200 tokens at $2.00, so $0.0024. That's $0.0039 per call, and its blended price is about $0.93 per million tokens. With 30 percent of calls repeated, the cost per finished task is $0.0039 x 1.30, or about $0.0051. Run B: 1,000 uncached input tokens at $1.50 is $0.0015, and 2,000 cached tokens at $0.15 is $0.0003. Output is 400 tokens at $6.00, so $0.0024. That's $0.0042 per call, with a blended price of about $1.24 per million tokens. Add 3 percent retries and the cost per finished task is about $0.0043. Look at what happened. On the pricing-page comparison, A is three times cheaper. On blended price per million tokens, A is still about 25 percent cheaper. On the number that matters, B wins by roughly 17 percent. A blended-price comparison would have sent you to the wrong model. At a million tasks a month the gap is $5,070 against $4,330, about $740. That's not a company-ending number, and it would be dishonest to say it is. It's also a gap you'd never see if you only compared list prices, and it grows fast once the workload gets heavier on input. Change the workload to document analysis: 20,000 input tokens per request, 18,000 of them a shared contract template, with a 300-token answer from B and 450 tokens from A. A's call costs $0.0100 for input plus $0.0009 for output, or $0.0109, and with retries about $0.0142. B pays $0.0030 for the 2,000 uncached input tokens, $0.0027 for the 18,000 cached ones and $0.0018 for output, $0.0075 in all, or about $0.0077 with retries. The model that was three times cheaper on the pricing page now costs 84 percent more per task. Cached tokens swing the answer most Prompt caching is the largest lever in that example, and it's the one most comparison spreadsheets leave out. Anthropic bills cache reads at 10 percent of the base input price. It charges a premium to write the cache, 1.25 times the base price for the default five-minute window. Other providers run their own versions, with discounts that differ by model, so check the current page rather than assuming. The consequence is that your input needs two prices, not one. Split your average input into the part that repeats and the part that doesn't, price each on its own line, and add the cache-write cost for the first call in each window. If your traffic is bursty and cache entries expire before the next request arrives, your hit rate falls and so does your discount. Measure the hit rate in production before you trust a projection that assumes 90 percent. Caching also changes how you should design the prompt. Put the stable material first and the user's question last, because a cache can only match from the start of a prompt. A founder who shuffles a timestamp or a user name into the first line can drop the hit rate to zero without noticing, and the model comparison done last month is suddenly wrong. Batch endpoints are the second discount worth modelling. Anthropic and OpenAI both offer batch processing at roughly half the standard price for work that can wait up to a day. If a third of your volume is nightly report generation or bulk classification, that third should be priced at the batch rate, and it can make a mid-priced model the cheapest option for that slice. Retries and the tokens you never see Retries are the quietest cost, because they hide inside a healthy-looking success metric. If your pipeline validates JSON and calls again on failure, every failure is a full second bill. Divide the cost of one attempt by your first-pass success rate, or multiply by one plus the retry rate, and use that figure in every comparison. A model with a 70 percent first-pass rate carries a 43 percent surcharge on every token it produces. Then there are reasoning tokens. Models that think before answering bill that thinking as output, and it can run to several times the length of the visible reply. A request that shows 200 tokens on screen can cost 2,000 on the invoice. If you're evaluating a reasoning model against a standard one, log the billed output field, not the length of the text you display. Tool-calling agents add a third leak, because each step in a loop resends the growing conversation as new input. A ten-step agent doesn't cost ten times one call. It can cost far more, since step ten carries the history of the previous nine. Model the loop, count the steps your agent actually takes, and treat the average as a distribution with a long tail. The tail is where the surprises live. Salesforce, which sells AI agents to other companies, has started capping how much AI its own employees can use each month, after its chief operating officer flagged that some staff spent thousands of dollars a month on tokens in a single quarter. If a company with that much leverage on pricing can lose track of consumption, a seed-stage startup with one shared API key can too. Put a per-user and per-feature spend alert on day one. What to do before you commit to a model Build the sheet in this order. One row per candidate model. Columns for average input tokens, cached share, average output tokens, input price, cached price, output price, retry rate and calls per task. The last column is cost per finished task, and it's the only one you sort by. Run it at your current volume and again at ten times. Some models flip rank when volume grows, because a cache discount or a batch discount starts to dominate. Then add the cost you can't see in the sheet: the engineering hours spent on retry logic and output parsing for the model that fails more often. A cheaper model that needs a week of prompt babysitting is rarely cheaper. Don't pick on cost alone either. Set a quality floor first, using your own test set of 100 or so real requests, and only compare prices among the models that clear it. The cheapest LLM API for startups is the cheapest one that passes your tests, and a failing model at half price isn't a discount. Finally, redo the exercise every quarter. Providers cut prices, change cache terms and ship new tiers often enough that last spring's winner can be this autumn's second choice. The same twenty minutes in a spreadsheet will tell you whether to switch. Also read: How to Calculate Cost of Goods Sold for AI Startups Before Diligence Does https://startupfortune.com/how-to-calculate-cost-of-goods-sold-for-ai-startups-before-diligence-does/ • How to Calculate Annual Contract Churn Lag Before Renewals Expose It https://startupfortune.com/how-to-calculate-annual-contract-churn-lag-before-renewals-expose-it/ • How to Calculate Sales Pipeline Velocity for Startups Before You Forecast https://startupfortune.com/how-to-calculate-sales-pipeline-velocity-for-startups-before-you-forecast/ This article is posted in AI News https://startupfortune.com/category/ai/ , check it out for more related stories. Join the discussion Open in the community → https://startupfortune.com/community/ Almost there. Sign in and your reply posts straight away.