How OpenAI API pricing works
OpenAI bills its API per token, separately for input and output, with a lower rate for cached input. The current models are the four sizes of the GPT-6 line: GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna, all with a 1.05M-token context window. Their launch history and how to choose between them are on the GPT-6 pricing and launch history page; this page covers how OpenAI bills them. OpenAI's open-weight models, gpt-oss-120b and gpt-oss-20b, are sold by other hosts; we list the cheapest.
Standard, Batch, Flex, Fast and Ultrafast
The same model costs different amounts depending on how quickly you need the answer:
| Processing | Price | Use it for |
|---|---|---|
| Standard | List price | Most apps |
| Batch and Flex | 50% less | Work that can wait: evaluations, data processing, overnight jobs |
| Fast | 2× | Faster replies (called Priority processing until 30 July 2026) |
| Ultrafast | 6× | The fastest replies, on GPT-6 Astra and GPT-6.1 Sol only |
For a chat assistant handling 100M input and 20M output tokens a month, GPT-6.1 Sol costs $400 at standard rates and $200 through Batch. Regional processing (data residency) and FedRAMP endpoints add 10% for models released on or after 5 March 2026, which includes the whole GPT-6 line.
Cached input and cache writes
When the start of a prompt matches one sent recently, OpenAI bills those tokens at the cached rate automatically: $1.00 per 1M on Astra (a tenth of input), $0.10 on GPT-6.1 Sol (a twentieth) and $0.01 on Luna. Storing tokens in the cache costs extra: 1.25× the input price for a cache that lasts 30 minutes, or 2.5× for one that lasts 12 hours.
The 12-hour option suits prompts you reuse all day but not every few minutes, such as a large knowledge base behind a low-traffic assistant. On GPT-6.1 Sol a 30-minute write pays for itself the first time the cache is read; a 12-hour write after two reads.
For a coding agent doing 400 tasks a month (about 750M input tokens, 85% of it cached, and 8M output), GPT-6.1 Sol costs $369 a month, against $1,580 with no caching, before cache-write charges. The table above shows the same workload on every current OpenAI model.
The 272,000-token threshold
Prompts over 272,000 tokens are billed at twice the input and cache prices and one and a half times the output price, and the higher rate applies to the whole request, not just the tokens over the line. So a slightly longer prompt can cost twice as much: on GPT-6.1 Sol, a 270,000-token prompt with a 2,000-token answer costs about $0.56, while a 275,000-token prompt with the same answer costs about $1.13. If your prompts are close to the threshold, trimming them below it halves the bill.
Is the OpenAI API free?
Not in general: OpenAI's pricing page lists no free allowance for its GPT models, and you need a positive account balance to make requests. ChatGPT has a free plan, but it doesn't include API access.
The exception is data sharing. Some organisations that let OpenAI use their API inputs and outputs get complimentary tokens every day: up to 1M a day shared across GPT-6.1 Sol, GPT-6 Astra, GPT-6 Sol, GPT-6 Luna and several older models on the Launch and Grow plans (250,000 on Build), and up to 10M a day on a group of smaller models including GPT-5.6 Terra and Luna (2.5M on Build). Use beyond that is billed normally, and your data-sharing settings page shows whether you qualify. Shared traffic may be used to train OpenAI's models, so it doesn't suit confidential work; read OpenAI's terms first.
ChatGPT plans or the API?
ChatGPT plans (Go at $8, Plus at $20, and Pro at $100, $200 or $500 a month) cover ChatGPT and Codex within usage limits. API calls from your own code are billed separately per token, but since 28 October 2026 paid Pro plans include the same amount in monthly API credits as their price ($100, $200 or $500), and Business plans include $20 per Standard seat or $100 per Premium seat, up to $500 a workspace. You claim the credits by linking an API organisation you own; unused credits expire at the end of the billing cycle. Codex can also run with an API key, in which case it's billed at API rates instead of your plan's allowance.
For one heavy user, a plan is usually cheaper; for anything you build for others, you need the API. See Codex pricing for how the plans' coding allowances compare, or work out your own break-even with the subscription vs API calculator.
OpenAI models on other clouds
Amazon Bedrock now lists GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Astra, GPT-6 Sol and GPT-6 Luna, with its own Standard, Priority, Flex and Batch tiers and per-region prices. Bedrock sets those prices itself, so compare them with OpenAI's rates above before choosing where to buy. Amazon Bedrock pricing.
Which OpenAI model, and which rival?
- GPT-6.1 Sol costs the same per token as Claude Sonnet 5.5, including cached input, for prompts under 272,000 tokens, so for most production work the choice comes down to quality on your tasks.
- GPT-6 Astra at $10 / $50 is OpenAI's most expensive standard model: compare it with Claude Opus 5.5 before paying five times Sol's price.
- GPT-6 Luna is one of the cheapest models from a major lab; its closest rival is Claude Haiku 5.5.
- gpt-oss-120b costs a few cents per million tokens through the cheapest hosts, if you can choose your host or run it yourself.
Other charges
- Web search costs $10 per 1,000 calls, plus the search results the model reads, billed at its normal token rates.
- Previous models stay available at their own prices: GPT-6 Sol at $2 / $10 with $0.20 cached input, and GPT-5.6 Sol at a promotional $4 / $20 until at least 21 November 2026.
- Retired snapshots: OpenAI lists shutdown dates for older models on its deprecations page; the ones that affect models we track are under "Coming up" above.
Sources: OpenAI API pricing, OpenAI data sharing and complimentary tokens, OpenAI deprecations, API credits for ChatGPT subscribers, Codex pricing. API prices and terms checked 2 November 2026; ChatGPT plan prices carry their own check date on the Codex plans page.