To estimate what an AI app will cost to run, measure the tokens in a typical request, price them at the model's per-token rates, and multiply by the requests each user makes and the number of users you expect. Take the token counts from real requests, since every API response reports the tokens it was billed for. Then allow for what grows after launch, such as chat history and retries, and check the estimate against real costs in the first week.
Measure the tokens in a real request
OpenAI's rule of thumb for English is about four characters, or three-quarters of a word, per token, so a 750-word prompt is roughly 1,000 tokens. Its token counting guide warns that the rule doesn't hold for images and files, and that tool definitions add tokens that are hard to count locally.
For a figure you can use, send 10 to 20 realistic requests through the app's real code path, with the full system prompt, real retrieved documents and conversations of a typical length. Then read the usage object in each response. In the Responses API it looks like this (example figures):
"usage": {
"input_tokens": 3912,
"input_tokens_details": { "cached_tokens": 0 },
"output_tokens": 486,
"output_tokens_details": { "reasoning_tokens": 192 },
"total_tokens": 4398
} Chat Completions reports the same counts as prompt_tokens and completion_tokens, and POST /v1/responses/input_tokens counts input before you send it. Note the typical count and the largest one you saw, because the estimate needs both.
Anthropic reports tokens per response too, as input_tokens and output_tokens in the Messages API's usage object, with cache reads and writes in separate fields. The same text can come to a different number of tokens on different providers and model generations, so count with the model you plan to use.
What makes requests use more tokens than you expect
A first test with a short question and an empty chat tends to undercount, for these reasons.
The system prompt
It goes out with every request. At 1,500 tokens and 100,000 requests a month, that's 150 million input tokens, or $150 at gpt-6.1-terra's list price, before any user types a word.
Chat history
Each turn resends the conversation so far, and even with previous_response_id, OpenAI bills all earlier input in the chain as input again. In an example chat with a 1,000-token system prompt where each exchange adds about 400 tokens, the first message sends about 1,100 input tokens and the tenth about 4,700, an average of 2,900. Base the estimate on the average over a conversation of typical length.
Retrieved context
Documents the app looks up before answering are input. Five 500-token chunks add 2,500 tokens to every request.
Tool calls
Function definitions are billed as input tokens on every request that includes them. Each tool call is also another request carrying the whole context, so a question that needs three tool calls is four requests. Built-in tools such as web search also charge per call.
Retries
If your code calls the model again when the output fails a check, such as JSON that doesn't parse, every attempt is billed. Add your retry rate to the request count.
Reasoning tokens
Reasoning models generate tokens you don't see, billed as output at five to eight times the input price on the models in the table below. OpenAI says a request can use anywhere from a few hundred to tens of thousands. Check output_tokens_details.reasoning_tokens in your tests, and see our post on OpenAI reasoning tokens for how the effort setting changes it.
Work out the cost per user and per month
Prices are per million tokens.
cost per request = (input tokens × input price + output tokens × output price) ÷ 1,000,000
daily cost = cost per request × requests per active user per day × daily active users
monthly cost = daily cost × 30Count requests as model calls, so one message that triggers a tool call is two requests. Price work that runs without a user, such as nightly summaries, separately. For users, use the number you expect to be active on a typical day rather than total sign-ups.
Example: a support chat assistant
These figures are illustrative. Each request sends 4,000 input tokens (a 1,200-token system prompt, 2,000 tokens of retrieved help articles, 700 of history on average and a 100-token question) and gets 500 output tokens back, reasoning included. Each active user sends six messages a day, each with one tool call, which makes 12 requests. There are 1,000 daily active users, and no caching or batch discounts.
| Model | Input / output per 1M tokens | Cost per request | Per active user per month | 1,000 daily users per month |
|---|---|---|---|---|
| gpt-6.1-sol | $2.00 / $10.00 | $0.0130 | $4.68 | $4,680 |
| gpt-6.1-terra | $1.00 / $5.00 | $0.0065 | $2.34 | $2,340 |
| gpt-5.4-mini | $0.75 / $4.50 | $0.00525 | $1.89 | $1,890 |
| gpt-5-mini | $0.25 / $2.00 | $0.0020 | $0.72 | $720 |
| gpt-6-luna | $0.10 / $0.50 | $0.00065 | $0.23 | $234 |
OpenAI Standard tier list prices as of November 2026. Token counts and usage are illustrative. Check the pricing page for current prices.
For the same traffic, the most expensive model here costs 20 times as much as the cheapest, so test whether a cheaper one does the job on your own requests. We'd present the result as a range, with a high end worked out from your longest test conversations.
The Batch API is 50 percent cheaper for work that can wait up to 24 hours. Prompt caching bills a repeated prompt prefix at a tenth of the input price or less on these models, though newer models need a prompt of at least 1,024 tokens and also charge for cache writes. Whether either applies depends on the workload, so leave both out of the first estimate.
Check the estimate after launch
Give each app or feature its own OpenAI project, or at least its own API key, so its cost shows up separately. Our guide to organizing OpenAI projects and API keys covers the layout. After the first full week, compare the estimate with real figures:
| In the estimate | Where to find the real figure |
|---|---|
| Input tokens per request | Usage API: input_tokens divided by num_model_requests, by project and model |
| Output tokens per request | Usage API: output_tokens divided by num_model_requests |
| Requests per user per day | Your own logs, since OpenAI doesn't know your app's users |
| Cost per day | Costs API: GET /v1/organization/costs, grouped by project_id or api_key_id |
Also log each response's usage with the feature and user it belongs to. That's the only way to see cost per user or per conversation. The Usage and Costs APIs need an organization Admin key, and our guide to the Usage and Costs API has working examples. Compare complete days only, because OpenAI doesn't say how quickly recent days settle.
Set a spend limit and alerts before launch
Put a hard monthly spend limit on the app's project, under Project settings, then Limits, then Spend, with "Enforce a hard limit" turned on. Once it's reached, requests fail with a 429 error and the code project_spend_limit_exceeded. OpenAI says enforcement isn't instantaneous, so spend can run slightly past the limit. Make sure the app handles that error without retrying it in a loop.
A new project limit comes with an alert at 100 percent. Add lower thresholds, such as 50 and 80 percent, knowing that alerts only notify. A prepaid balance isn't a dependable cutoff, because auto-recharge is on by default and its monthly cap limits credit purchases rather than usage. See OpenAI's spend limits guide and our guide to OpenAI spend alerts and limits.
In the app, set a daily message limit per user and a max_output_tokens value with room for reasoning. OpenAI's limits cover the whole project, so one user or one bug can use up everyone's budget.
On our founder's team, before Braid existed, a bug kept calling an OpenAI endpoint for almost two weeks. Daily spend went from about $2 to more than $90, and it cost $1,051.96 before it was stopped.
Common questions
How much does the OpenAI API cost per user?
It depends on tokens per request and requests per user, and both vary a lot between apps. In the example above, a support assistant making 12 requests per active user per day costs between $0.23 and $4.68 per user per month, depending on the model.
How do I count tokens before sending a request?
For a rough count of English text, divide the characters by four. OpenAI's open-source tiktoken library counts plain text on your machine. For requests with tools, images or files, use OpenAI's /v1/responses/input_tokens endpoint or Anthropic's free /v1/messages/count_tokens.
Why is my real AI API cost higher than my estimate?
Usually real requests carry more than the test ones did, through longer chat history, more retrieved context, tool round trips, retries and reasoning. Compare tokens per request in the Usage API with your estimate to see which side grew. If the request count grew instead, check your logs for loops and retries.
Where Braid fits
Braid covers the part after launch. It connects to your OpenAI organization with a read-only Admin API key, maps each project and API key to the app or feature it pays for, with an owner and a monthly budget, and emails a weekly report of spend against that budget. It also flags unusual spend and budget thresholds in the app and by email.
It doesn't estimate costs before launch, track cost per request or per end user, or stop requests. The beta currently supports OpenAI API accounts. More provider connections are planned.