How Much Does the OpenAI API Cost? (Worked Example)
How much does the OpenAI API cost? For a small feature it is less than most people guess — a few dollars a month. For a busy one it is far more than they expect. The answer is always the same maths: tokens times price, times requests. This post works it out step by step with GPT-6.2 Astra’s current prices, so you can see exactly where the money goes — and if you want your own number, the AI Cost Calculator does the same maths for any model and any usage, free.
OpenAI API pricing: what you pay for
OpenAI charges per million tokens, and input and output are priced separately. Input is what you send; output is what the model writes. On the OpenAI pricing page, the current text-model rates are:
- GPT-6.2 Astra — $8.00 input, $0.40 cached input, $40.00 output per 1M tokens.
- GPT-6.2 Sol — $2.00 input, $0.10 cached input, $10.00 output per 1M tokens.
- GPT-6 Astra — $10.00 input, $1.00 cached input, $50.00 output per 1M tokens.
There is no subscription and no minimum: you pay for the tokens you use. Cached input — tokens that repeat a previous request — costs far less than fresh input, which is why a long system prompt you send every time can be cheap once it is cached.
The worked example: 100 requests a day on GPT-6.2 Astra
Take a small feature: 1,000 input tokens and 500 output tokens per request, 100 requests a day, 30 days a month, on GPT-6.2 Astra.
- Input per request. 1,000 ÷ 1,000,000 × $8.00 = $0.008.
- Output per request. 500 ÷ 1,000,000 × $40.00 = $0.02.
- Cost per request. $0.008 + $0.02 = $0.028.
- Cost per day. $0.028 × 100 requests = $2.80.
- Cost per month. $2.80 × 30 days = $84.00.
- Cost per year. $84.00 × 12 = $1,008.00.
That is 3,000,000 input tokens and 1,500,000 output tokens a month. If your prompts are longer, or your users send more requests, the same maths scales with them — double the requests and the bill doubles too.
GPT-6.2 Astra vs GPT-6.2 Sol vs GPT-6 Astra
The same workload — 1,000 input and 500 output tokens, 100 requests a day, 30 days — costs very different amounts depending on the model:
- GPT-6.2 Sol: $21.00 a month.
- GPT-6.2 Astra: $84.00 a month.
- GPT-6 Astra: $105.00 a month.
Sol costs a quarter of Astra on input and a quarter on output, so the same feature runs for $21 instead of $84. That is why the model choice matters more than almost anything else: before you build on the most expensive model, check whether a cheaper one does the job. The AI Cost Calculator prices the same workload across every model, cheapest first, so the comparison takes seconds.
What changes your monthly OpenAI bill
Four things move the number. First, tokens per request: a 4,000-token prompt costs four times a 1,000-token one. Second, requests per day: every extra user multiplies the whole bill. Third, output length: output costs five times input per token on GPT-6.2 Astra, so a reply that runs long costs far more than the prompt that triggered it. Fourth, caching: if half your input tokens are cached, the input half of the bill on GPT-6.2 Astra drops from $24 a month to $12.60 at the example usage — cached input is $0.40 per million instead of $8.00.
If you do not know how many tokens your prompts use, count them with the AI Token Counter before you estimate. Guessing the token count is the most common way an estimate goes wrong.
How to keep your OpenAI API bill down
Start with the cheapest model that handles the task, and only move up if the answers are not good enough. Cache repeated prompts — a system prompt you send with every request should be cached, not re-billed at full price. Keep outputs short: ask for a summary instead of a full rewrite, and set a length limit in the prompt. And estimate before you build, not after the first invoice: run your expected tokens and requests through the calculator and see the monthly figure first.
Work out your own number
The example above is one workload. Yours will be different — different prompts, different volume, maybe a different model. Put your own numbers into the AI Cost Calculator and see the cost per request, per day, per month and per year before you write a line of code.
Conclusion
The OpenAI API costs what your tokens cost: 1,000 input tokens and 500 output tokens per request, 100 times a day, is $84 a month on GPT-6.2 Astra, $21 on GPT-6.2 Sol and $105 on GPT-6 Astra. The maths is simple — tokens divided by a million, times the price — but the total depends entirely on your usage, so estimate it with your own numbers. Try the AI Cost Calculator with your expected prompts and volume, and see what your feature will cost to run. What will you build first — and what will it cost to run?