Build1 distinct publisher3 min readUpdated
A worked example on dev.to shows a prompt that grew from 1,500 to 5,000 tokens more than doubling a monthly bill, with no new users and no price change.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
A dev.to explainer on estimating AI API costs works through one arithmetic example and lands on a point that most vendor conversations skip: the price per million tokens is one input to the formula, and rarely the one that moves the total [1][17]. If you are signing off on an AI feature's budget, the leverage sits in your prompt size and your call graph, not in the rate card.
Start with the author's base case. A feature using 1,500 input tokens and 300 output tokens per request, at 10,000 requests a day across 30 days, consumes 450 million input tokens and 90 million output tokens a month [2][3]. At an illustrative $1.50 per million input and $6.00 per million output, that is $675 plus $540, or $1,215 a month [4][5]. The unit economics look trivial: about $0.00405 per request, less than half a cent [6]. Three hundred thousand of them are not a rounding error [7].
Notice what the split already tells you. Output is one sixth of the tokens but 44 percent of the cost, because output is priced at four times input in this example [3][4]. The author's point is that two applications with identical total token counts can have different economics, and that the useful question is how many input and output tokens a typical completed task consumes [10][12]. A classifier sends a lot of context and returns a few tokens; a writing assistant generates hundreds or thousands every run; a coding agent reads context repeatedly and produces substantial output across several calls [11].
Then the quiet multiplier. Hold volume and prices constant and let the average prompt grow from 1,500 to 5,000 input tokens, as system instructions, conversation history, retrieved documents, tool descriptions, examples and metadata accumulate [8][9]. Monthly input tokens go to 1.5 billion, input cost to $2,250, and the total to $2,790 [8]. That is 2.3 times the original bill, up $1,575, with no new users and no repricing [8][1]. Input grew 3.33 times but the bill only 2.3 times, because the $540 of output cost did not move [2]. Context management is a cost line, not just a latency and quality problem [16].
Fan-out is larger still. One button press can trigger a classification, a retrieval, a reasoning call, a second model call with the retrieved context, an evaluation step and a retry [13]. The author's caution is that if one user action generates six model requests, estimating from user actions alone dramatically underestimates usage [14]. Applied to the base example, six calls of that shape is $7,290 a month rather than $1,215 [5]. Which is why the unit to budget in is cost per completed workflow, not cost per message [15].
Put the rate card in perspective. Halving both prices in the base case saves $607.50 a month [6]. One unbudgeted second call in the chain adds $1,215 [7]. A 100 percent discount cannot rescue you from a call graph you have not counted.
What to watch: instrument tokens in and out per completed workflow, not per request, and alarm on the ratio of model calls to user actions. If that ratio drifts, including retries, your bill moves before anyone renegotiates a contract [13][14].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
A basic AI API cost calculation is: input cost = monthly input tokens / 1,000,000 x input price per million; output cost = monthly output tokens / 1,000,000 x output price per million; monthly API cost = input cost + output cost. The formula is simple but estimating the numbers that go into it is not.
A single AI API request can cost less than a cent and still turn into a four-figure monthly bill; the price per million tokens is only one variable.
Example feature: 1,500 input tokens per request, 300 output tokens per request, 10,000 requests per day, 30 active days per month.
That workload equals 450 million input tokens and 90 million output tokens per month.
Illustrative model prices used in the example: $1.50 per million input tokens and $6.00 per million output tokens.
Input cost 450 x $1.50 = $675; output cost 90 x $6.00 = $540; total $1,215 per month.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Internally consistent arithmetic, no external grounding
Every number in the cluster comes from one self-published dev.to post using prices the author labels 'purely as an example'. The arithmetic is fully reproducible and self-consistent (450M/90M tokens, $675/$540/$1,215, $0.00405 per request, $2,790 in the bloat case), which is why this is not scored near zero. But there is no vendor rate card, no production bill, no measurement of real prompt growth or fan-out rates, and no second publisher to corroborate, so the evidentiary base for anything beyond the illustrative model is thin.
No adoption signal in cluster
The cluster contains no release, deployment, benchmark, pricing-change or usage-disclosure event. No organisation is named as using this cost-modelling approach and no product, model or provider is identified, so there is nothing to measure adoption against.
Slightly overstated framing, well-hedged body
The framing devices lean hard - 'less than a cent' turning into 'a four-figure monthly bill', prompts that 'quietly multiply the bill' - and the four-figure outcome is an artefact of chosen volume rather than a discovered effect. The body then hedges honestly: prices are called illustrative, the author states the point is not that AI APIs are expensive, and caching is said to require modelling rather than assumption. Net result is a small positive gap driven by headline emphasis, not by unsupported substantive claims.
Low commercial stake; audience-building incentive
The source is an individual author post on a community publishing platform. No provider, product, vendor or tool is named or recommended, prices are generic rather than any company's, and there is no call to action or affiliate framing in the supplied body. The residual incentive is reputational - publishing an explainer that attracts readers - which can favour striking framing over cautious numbers, consistent with the small positive hype gap.
Moderate: verifiable method, single unverified source
Confidence is moderate because what the cluster asserts is mostly arithmetic that can be checked without trusting the author, and the derived multiples reproduce cleanly. It is held below the midpoint by structural limits: one publisher, one author, illustrative inputs, zero adoption evidence, and a truncated body that cuts off inside the scenario-modelling guidance.
build
Force the tool call, then hand Lightsail a long-lived key1 distinct publisher
build
AI-written code fails the same four ways, and every gate you own reports green1 distinct publisher
build
CSA's 2026 threat list is a flat line, so ask which threats a config snapshot can prove1 distinct publisher
build
An empty array is a claim about your query: verify identifiers before you trust the metric1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 15, 2026