OpenAI API pricing explained in one sentence: it is pay-as-you-go billing, charged per million tokens, with separate rates for input, cached input and output, and no subscription fee. The central question is how much an application will actually cost, and the short answer is that it depends on which model you call, how long your prompts are, how much text the model writes back, and whether you use the discounts OpenAI offers for caching and batch work.
The pricing page looks simple, but the bill rarely is. Output tokens cost several times more than input tokens, long prompts carry a surcharge on some models, and the same request can cost ten times more on one model than on another. This guide explains how the pricing model works, what the current rates are for the main models, where the hidden costs sit, and how to keep the bill under control.
Key takeaways
- OpenAI API pricing is pay-as-you-go, billed per million tokens, with separate input, cached input and output rates and no subscription fee.
- Output tokens cost far more than input tokens on every model, so output length is the largest lever on any bill.
- The Batch API cuts standard rates by half for work that can wait, and prompt caching cuts repeated input costs sharply.
- Prompts above roughly 270,000 input tokens carry a higher rate on some flagship models.
- API billing is separate from ChatGPT subscriptions, and usage is funded through its own prepaid balance.
How token billing works
A token is a chunk of text, roughly three quarters of a word in English, and every API call is metered in tokens. You pay for the tokens you send in and the tokens the model writes out, at separate rates. There is no per-request fee and no subscription required for API access, which means a small application can start for pennies and a large one can run into thousands of dollars a month on volume alone.
The split between input and output matters more than the headline rate. On the flagship models, output costs five to eight times as much as input, so a chat application that sends short questions and receives long answers is paying mostly for output. That is why capping output length, asking for concise answers and avoiding verbose system prompts are the first cost controls to apply.
For the token maths in detail, see our LLM token cost calculator guide.
The main model rates
The rates below are the standard short-context rates listed on OpenAI’s pricing page in late 2026, verified against several independent pricing trackers that check the official page. They change frequently as new models launch, so treat them as a comparison of relative cost and always confirm the current rates before setting a budget.
The flagship, GPT-6 Astra, is listed at 10 dollars per million input tokens and 50 dollars per million output tokens. GPT-5.6 Sol is listed at 4 dollars input and 20 dollars output, GPT-5.5 at 5 dollars input and 30 dollars output, and GPT-5.4 at 2.50 dollars input and 15 dollars output. The original GPT-5 is listed at 1.25 dollars input and 10 dollars output, which makes it the cheapest flagship-tier model.
GPT-4.1 is listed at 2 dollars input and 8 dollars output, and GPT-4o at 2.50 dollars input and 10 dollars output.
The small models are where the savings live. GPT-5 mini is listed at 0.25 dollars input and 2 dollars output per million tokens, GPT-5 nano at 0.05 dollars input and 0.40 dollars output, GPT-4.1 nano at 0.10 dollars input and 0.40 dollars output, and GPT-4o mini at 0.15 dollars input and 0.60 dollars output. At these rates, a million input tokens on GPT-5 nano costs five cents, against ten dollars on GPT-6 Astra.
Best for: routing routine work to small models while reserving flagship models for hard cases.
Cached input, Batch API and long-context rates
Three mechanisms change the effective price. First, prompt caching: when a request reuses a long system prompt or document, the cached portion is billed at a fraction of the standard input rate. On GPT-5 and GPT-6 models, cached input costs a tenth of the standard rate, on GPT-4.1 models a quarter, and on GPT-4o half.
For applications with long, repeated prompts, caching is often the single largest saving.
Second, the Batch API: work that can wait up to 24 hours is billed at half the standard rate, which is a 50 percent discount for overnight processing, evaluations and bulk generation. Third, long context: on some flagship models, prompts above roughly 270,000 input tokens are billed at a higher rate for the whole session, with input roughly doubling and output rising by half. Very long prompts are therefore much more expensive than the headline rate suggests.
For the batch pattern in detail, see our guide to LLM batch processing costs.
Beyond text: images, audio and embeddings
Text models are not the only metered service. Image generation, image editing, speech-to-text, text-to-speech and embeddings are all billed separately, each with its own unit: per image, per minute of audio, or per million tokens for embeddings. Audio is typically billed by the minute, and image generation by the image and its size, so the cost shape is different from text and needs its own estimate.
The practical point is that a multimodal application has several bills, not one, and the non-text services can dominate if they are used carelessly. An application that transcribes hours of audio or generates thousands of images needs those services priced into its unit economics from the start, not discovered in the first invoice. Best for: estimating each service separately and including all of them in unit economics.
Usage tiers and rate limits
OpenAI gates API access through usage tiers, which rise as you spend more and build a payment history. Higher tiers unlock higher rate limits, which are the number of requests and tokens you can send per minute, and access to newer models. A new account starts at a low tier with modest limits, which is a common surprise for teams that expect to scale immediately.
Rate limits are not a price, but they shape the bill, because hitting a limit means retries, delays and engineering work to smooth traffic. The fix is to request a tier increase early, to spread load across time where possible, and to design for graceful degradation when the API is busy. For the resilience side, see our guide to graceful degradation.
Comparing OpenAI API pricing by model
| Model | Input per 1M tokens | Cached input per 1M | Output per 1M tokens | Batch input per 1M |
|---|---|---|---|---|
| GPT-6 Astra | $10.00 | $1.00 | $50.00 | $5.00 |
| GPT-5.6 Sol | $4.00 | $0.40 | $20.00 | $2.00 |
| GPT-5.5 | $5.00 | $0.50 | $30.00 | $2.50 |
| GPT-5.4 | $2.50 | $0.25 | $15.00 | $1.25 |
| GPT-5 | $1.25 | $0.125 | $10.00 | $0.625 |
| GPT-4.1 | $2.00 | $0.50 | $8.00 | $1.00 |
| GPT-4o | $2.50 | $1.25 | $10.00 | $1.25 |
| GPT-5 mini | $0.25 | $0.025 | $2.00 | $0.125 |
| GPT-5 nano | $0.05 | $0.005 | $0.40 | $0.025 |
Rates are the standard short-context rates listed on OpenAI’s pricing page in late 2026, confirmed against several independent trackers, and they change frequently. The table makes the structure visible: output costs five to eight times input, caching cuts input costs by up to 90 percent, and batch work costs half. The cheapest way to cut a bill is usually not to change model but to use caching, batching and shorter outputs.

How to control the bill: a decision framework
Start by measuring. Log input tokens, output tokens and cost per request, broken down by feature and by model, so you know where the money goes before you try to save it. Most teams find that one feature or one prompt accounts for most of the spend, and that is where the work belongs.
Then apply the controls in order of impact. Route routine calls to mini or nano models, switch on prompt caching for repeated prompts, move work that can wait to the Batch API, cap output length, and trim system prompts to what the model actually needs. Set billing alerts and per-key spending limits so a bug or an abuse attempt cannot run up an unbounded bill.
For the full playbook, see our LLM cost optimisation playbook and our LLM token usage tracking guide.
OpenAI API pricing explained checklist
- Input, cached input and output are tracked separately, because output costs several times more than input.
- The cheapest model that meets the quality bar is the default, with flagship models reserved for escalation.
- Prompt caching is switched on for repeated system prompts and long documents.
- Work that can wait runs through the Batch API at half the standard rate.
- Output length is capped and answers are asked for concisely.
- Usage is logged per feature and per model, with billing alerts and spending limits in place.
- Rates are re-checked on the official pricing page before any budget is set, because prices change often.
Frequently asked questions
How is the OpenAI API priced?
It is pay-as-you-go, billed per million tokens, with separate rates for input, cached input and output. There is no subscription fee and no per-request fee. API billing is separate from ChatGPT subscriptions and is funded through its own prepaid balance.
How much does GPT-5 cost per million tokens?
GPT-5 is listed at 1.25 dollars per million input tokens and 10 dollars per million output tokens, with cached input at 0.125 dollars. GPT-5 mini costs 0.25 dollars input and 2 dollars output, and GPT-5 nano costs 0.05 dollars input and 0.40 dollars output.
What is the cheapest OpenAI API model?
GPT-5 nano, at 0.05 dollars per million input tokens and 0.40 dollars per million output tokens, is the cheapest text model in the lineup. It suits classification, routing, extraction and other narrow tasks at massive scale.
What is the Batch API discount?
The Batch API bills work at half the standard rate, a 50 percent discount, in exchange for allowing up to 24 hours for completion. It suits overnight processing, evaluations, bulk generation and any work that does not need an immediate answer.
Does the OpenAI API charge for cached prompts?
Yes, but at a much lower rate. Cached input costs a tenth of the standard input rate on GPT-5 and GPT-6 models, a quarter on GPT-4.1 models and half on GPT-4o. Caching is automatic for repeated prompts, and it is often the largest single saving.
Why is my OpenAI API bill higher than expected?
The usual causes are long outputs, because output tokens cost several times more than input, long prompts that trigger higher long-context rates, and routine work running on a flagship model instead of a mini or nano model. Logging tokens per feature and per model will show which of these is responsible.
Note: API prices change frequently as new models launch. The rates in this article are the standard rates listed on OpenAI’s pricing page in late 2026, confirmed against several independent pricing trackers. Check the official pricing page before setting a budget or quoting a price to a customer.







