01A cost estimate depends on defining one call before it depends on price
In April 2026 the operator was building a share-price forecasting system. A numerical model produced a result for each stock, and a language model was to read and examine those results.
Partway through, the operator asked an AI to estimate API costs for three providers: OpenAI, Google and Qwen. The request was to look up the prices, judge how much would be used, and give a figure per day and per month.
An API is the connection a program uses to call an AI model directly. A token is the smallest unit a model counts when it processes text, and API charges are set by the number of tokens.
The operator then asked two more questions. What exactly is "one call"? And how many calls would there be in total?
A cost figure comes from multiplying three things: the price, the amount used per call, and the number of calls. The price is on a published list. The other two cannot be worked out until someone decides what counts as one call. The operator's two questions went straight to that assumption.
This piece asks one thing. When you have AI estimate a cost, which decision belongs to you first? The answer is not the price. It is the definition of the unit being counted.
02Cost is a product of three numbers, and the user sets two of them
API cost can be written roughly as follows. Take the tokens sent in one call and the tokens received, multiply each by its price, then multiply by the number of calls per day.
Providers set and publish the prices. Anthropic's pricing page lists input and output separately, in US dollars per million tokens. Google's Gemini API pricing page also gives input and output prices on separate rows. OpenAI's help centre notes that input and output tokens can be priced differently.
No price list says how many tokens you will send per call, or how many calls you will make each day. Those two numbers are set by whoever designs the process.
| Element | Who sets it | Where to find it | What goes wrong if left open |
|---|---|---|---|
| Input and output prices | The provider | The official price list | The calculation uses an old price |
| Tokens sent per call | The user (what is passed in) | Count a realistic input | History and reference text are left out |
| Tokens received per call | The user (what is asked for) and the model | Usage data returned with each response | Long replies and reasoning are missed |
| Calls per day | The user (how the process is split) | Write out the process step by step | The answer is off by an order of magnitude |
If a price is twice as high, the cost doubles. If the calls are counted differently, the cost can differ by a factor equal to the number of stocks. Large errors in an estimate usually come from the two numbers the user controls, not from the price.
03Without a defined unit, estimates cannot be compared or checked
Put three providers' costs side by side and the natural move is to pick the cheapest. That comparison only holds if all three estimates were counted in the same unit.
Take an example. One design calls the model once per stock. Another passes every stock in a single call. The number of calls differs by the number of stocks. Batching cuts the call count but makes each input longer. An estimate that does not say which design it assumed cannot be compared with another.
Measurement science settled this long ago by international agreement. The International Bureau of Weights and Measures describes the SI as internationally agreed definitions of measurement units, giving a common framework so results can be compared across countries and fields. To compare numbers, you first agree on the unit. Cost estimates follow the same order.
Once the unit is fixed, an estimate can be checked later. Run a small trial, record tokens per call and calls per day, and you can see which number was off. Without a fixed unit you can tell the estimate was wrong, but not where.
This matters to whoever approves the budget. A figure of "about this much a month" gives them nothing to judge. If tokens per call, calls per day and the date of the price list are shown separately, they can see which change would move the cost.
04One call is one request sent to the API and one response received
This piece uses a plain definition. One call runs from the moment a program sends one request to the API until it receives one response from the model. Each call is charged by its input and output tokens.
The useful part of any definition is the boundary: what falls inside one call and what does not.
Counted as input
Instructions, the data passed in, the conversation so far, and tool definitions. Anthropic's pricing page counts tool definitions as input tokens.
Counted as output
The reply plus whatever the model reasoned internally. OpenAI bills reasoning tokens as output, and Google's output price includes thinking tokens.
A separate call
When the AI uses a tool, another request is needed to return the tool result. A request resent after an error is also a call.
Not the same as a click
One request typed on screen can become several calls behind it. What counts is how many requests reached the API.
Some things fall outside this definition. Chat services paid by monthly subscription do not charge per call. This piece covers programs that use an API and pay for the amount used.
05In material review, count the calls per item before anything else
Pharmaceutical companies are starting to plan API use for first-pass checks of promotional material and for summarising papers. The first thing such a plan needs is an estimate of how many calls one unit of work becomes.
Take a first-pass material check. Does one piece of material go in a single call, one call per page, or one call per claim? Suppose the check is split into eight review angles, each with its own call: the count goes up eightfold. If the package insert is attached to every call for comparison, its full length is added to every input.
| Task | Candidate unit for one call | What sets the number of calls | What makes each input heavy |
|---|---|---|---|
| First-pass material check | One piece, one page, or one claim | Items × how they are split × review angles | Package insert and other reference text attached each time |
| Paper summaries | One paper or one section | Papers × summary stages | Length of the text, figure images |
| Draft replies to enquiries | One enquiry | Enquiries × draft-and-revise round trips | Past replies supplied as examples |
Written out this way, the cost discussion moves into the language of the work. A reviewer can say how many pieces are checked each month and in how many stages. What gets attached to each input also overlaps with internal rules on what information may be given to an AI.
The same breakdown helps in a budget request. It shows in advance how the cost moves if the number of items doubles or if a review angle is added.
06Calls and tokens grow out of sight because the API keeps no memory
Estimates tend to come in low because of how APIs work.
The first cause is conversation history. Anthropic's documentation for its Messages API says the API is stateless, so the full conversation is sent every time. In a ten-turn exchange, the tenth input carries the nine before it. Each call gets larger as the conversation goes on.
The second cause is tool round trips. When an AI is allowed to search or calculate with a tool, the model replies that it wants to use the tool, and the program sends the result back. Anthropic's documentation shows this takes a second request. The tool definitions are also added to every input.
The third cause is output you do not see. Models that reason before answering count that reasoning as output tokens. A short visible reply can still carry a large output count.
The fourth cause is input that is not text. Google's documentation counts an image of 384 pixels or less on each side as 258 tokens, and audio as 32 tokens per second. A design that sends images of the material adds those tokens to every input.
The tools for cutting cost work on the same unit. On Anthropic's pricing page, reading a cached prompt prefix costs 0.1 times the normal input price, and batch processing for work that is not urgent halves both input and output prices. Neither saving can be estimated until you know what goes into each call and how many calls there are.
07From tomorrow, have AI write definition, volume, count and price in that order
When you ask an AI to estimate API cost, ask for five things in order.
- Define one call in a sentence. Have the AI write out the process and state what is sent and received in one call.
- Count the volume of one call. Prepare one realistic input and get the input and output token counts. Anthropic and Google both offer a way to count tokens before sending.
- Work out calls per day. Multiply items by how they are split by round trips, and add resends separately.
- Check prices against the official list. Record the date you checked. Prices change.
- Run a small trial and compare. Put the usage data returned with each response next to the estimate. If a number is off, go back to the definition.
Do not leave steps one and three entirely to the AI. Deciding what counts as one call is a decision about how the work is divided. Read the definition the AI proposes and check that it matches the way your work is actually split.
Keep the definition and assumptions with the estimate. A bare figure is hard to update six months later, when the process has changed and nobody knows which number to fix.
- API cost is the product of tokens per call, number of calls and price. The price is published, but the user sets volume and count.
- One call has a boundary. Resent history, tool round trips and reasoning output are invisible on screen but still billed.
- When AI estimates cost, have it write definition, volume, count and price in that order, then check with a small trial. People decide what counts as one call.
A cost estimate is a job of definition before it is a job of arithmetic. Once one call is defined, several AI providers with different prices can be compared in the same unit, and a trial run shows exactly which number was wrong. AI is fast at looking up prices and multiplying. Deciding what to count stays with the person who knows the work.
- Anthropic. Pricing. Claude Developer Platform Docs. https://platform.claude.com/docs/en/about-claude/pricing
- Anthropic. Using the Messages API. Claude Developer Platform Docs. https://platform.claude.com/docs/en/build-with-claude/working-with-messages
- Anthropic. Tool use with Claude. Claude Developer Platform Docs. https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview
- Anthropic. Token counting. Claude Developer Platform Docs. https://platform.claude.com/docs/en/build-with-claude/token-counting
- Google. Gemini Developer API pricing. Google AI for Developers. https://ai.google.dev/gemini-api/docs/pricing
- Google. Understand and count tokens. Google AI for Developers. https://ai.google.dev/gemini-api/docs/tokens
- OpenAI. Understanding and counting tokens. OpenAI Help Center. https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them
- BIPM (International Bureau of Weights and Measures). The SI. BIPM. https://www.bipm.org/en/measurement-units