OpenAI API Cost in 2026: Prices per Model and Examples
Table of contents:
Quick Answer:
OpenAI API cost is pay-as-you-go. You pay per million tokens, with separate prices for input, cached input and output. OpenAI's recommended current models range from GPT-6 Luna at $0.10 input / $0.50 output per 1M tokens, through GPT-6.2 Sol at $2 / $10, to the flagship GPT-6.2 Astra at $8 / $40.
The API key itself is free, but new accounts must prepay at least $5 in credits. A small app sending 1,000 requests a month can cost well under $10. A support bot handling 100,000 requests a month costs from about $22 to $1,660, depending on the model.
Your OpenAI API cost depends on three things: which model you call, how many tokens go in and out, and which processing options you use.
The list price is only the start. Cached input, long prompts, Batch discounts and speed tiers can move the same workload's bill by 2x or more in either direction.
This guide gives you the current OpenAI API cost for every recommended model, the multipliers most price lists leave out, a formula with worked monthly examples, and practical ways to cut OpenAI API costs.
If you use models from more than one provider, ScriptRun's OpenAI-compatible API gives you one key and one bill for OpenAI, Claude and Gemini
All OpenAI prices below were checked on OpenAI's API pricing page on November 30, 2026. They're Standard rates in US dollars unless noted.
Disclosure: ScriptRun publishes this article and sells access to models from several providers, including OpenAI.
How OpenAI API cost is calculated
Your OpenAI API cost is billed by the token. A token is a chunk of text, roughly a short word or part of a longer one. Every request has two sides:
-
Input tokens: everything you send, including the system prompt, the conversation history, tool definitions, documents and images.
-
Output tokens: everything the model generates. On reasoning models, the hidden reasoning tokens count too. OpenAI's reasoning guide says they "are billed as output tokens", even though you never see them.
Prices are quoted per 1 million tokens, and output always costs more than input: five times more on the GPT-6 models. To get the OpenAI API cost per token, divide the listed price by 1,000,000. On GPT-6.2 Sol, one input token costs $0.000002 and one output token $0.00001.
Two more line items show up on your bill:
-
Cached input. When the start of a prompt matches a recent request, OpenAI reuses its earlier work and bills those tokens at a 90–95% discount.
-
Cache writes. On GPT-5.6 and later models, storing a prompt in the cache costs a little more than normal input: 1.25x for the default 30-minute cache and 2.5x for the 12-hour cache.
So your OpenAI API token costs are really four numbers per model, not two.
Pages that list only input and output prices understate what long, repeated prompts cost on the first request and overstate what they cost afterward.
OpenAI API cost by model in 2026
Here are the OpenAI API costs by model for OpenAI's current recommended lineup, per 1 million tokens at Standard rates:
Model | Input | Cached input | Output | Cache write (30 min) | Cache write (12 h) |
GPT-6.2 Astra | $8.00 | $0.40 | $40.00 | $10.00 | $20.00 |
GPT-6.2 Sol | $2.00 | $0.10 | $10.00 | $2.50 | $5.00 |
GPT-6.1 Sol | $2.00 | $0.10 | $10.00 | $2.50 | $5.00 |
GPT-6.1 Terra | $1.00 | $0.05 | $5.00 | $1.25 | $2.50 |
GPT-6 Astra | $10.00 | $1.00 | $50.00 | $12.50 | $25.00 |
GPT-6 Luna | $0.10 | $0.01 | $0.50 | $0.125 | — |
GPT-5.6 Sol | $4.00 | $0.40 | $20.00 | — | — |
GPT-5.6 Sol's rate is promotional: OpenAI's pricing page says it runs until November 30, 2026, so check the current price before you budget for it.
Which one gives you the best OpenAI API cost for your app?
OpenAI's models overview suggests GPT-6.2 Astra for complex reasoning and coding, GPT-6.2 Sol "to balance intelligence and cost", and GPT-6 Luna "for cost-sensitive, high-volume workloads".
All three have a 1.05M-token context window and up to 128K output tokens. The price gap is large: GPT-6.2 Astra costs 4x as much as GPT-6.2 Sol and 80x as much as GPT-6 Luna, for both input and output.
Note that the older GPT-6 Astra costs more than the newer GPT-6.2 Astra ($10 / $50 vs $8 / $40). Moving off an older model isn't always a downgrade in price.
What changes your OpenAI API cost
The table above shows Standard rates. Several options and conditions change the OpenAI API cost of the same request:
Factor | Effect on price | Which models |
Long prompts (more than 272K input tokens) | 2x input and cache rates, 1.5x output, for the whole request | Models with long-context pricing |
Batch API | 50% off Standard; results arrive asynchronously | Batch-supported models |
Flex processing | 50% off Standard; in beta | GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna |
Background requests | 30% off (2-hour window) or 40% off (8-hour window) | GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra, GPT-6 Luna |
Fast mode (formerly Priority) | 2x Standard | Fast-supported models |
Ultrafast | 3x Standard until Feb 28, 2027, then 6x; 6x on GPT-6 Astra and GPT-6.1 Sol | GPT-6.2 Astra and Sol; GPT-6 Astra; GPT-6.1 Sol |
Data residency or FedRAMP endpoints | +10% | Models released on or after March 5, 2026 |
Cache writes | 1.25x input (30 min) or 2.5x input (12 h) | GPT-5.6 and later |
Cache reads | 90–95% off input | Models with cached-input pricing |
OpenAI notes that Flex won't be added to new models, so it suits workloads that run on the models listed above.
The long-context rule catches people out. A request with 300,000 input tokens and 2,000 output tokens on GPT-6.2 Sol costs about $1.23 (300,000 × $4 per 1M, plus 2,000 × $15 per 1M). Trim the same prompt to 250,000 tokens and it costs about $0.52.
Because the higher rate applies to the whole request, crossing 272K tokens by a little more than doubles the bill.
The discounts work the other way. Anything that doesn't need an instant answer (nightly reports, document tagging, evaluations) can usually run through the Batch API or Flex at half the OpenAI API cost.
Speed costs extra: Fast mode doubles the bill, so keep it for the requests where users are actually waiting.
How to estimate your OpenAI API cost per month
You don't need an OpenAI API cost calculator to get a solid estimate. One formula covers it:
Cost per request = (uncached input tokens × input price + cached input tokens × cached price + cache-write tokens × write price + output tokens × output price) ÷ 1,000,000
Multiply your OpenAI API cost per request by the number of requests a month, then apply any discount or multiplier from the table above.
Worked example. A support chatbot on GPT-6.2 Sol sends 2,000 input tokens per request, 1,500 of which are a fixed system prompt that stays cached, and gets 300 output tokens back:
Uncached input: 500 × $2 ÷ 1M = $0.001
Cached input: 1,500 × $0.10 ÷ 1M = $0.00015
Output: 300 × $10 ÷ 1M = $0.003
Total: $0.00415 per request, or $415 for 100,000 requests a month
This leaves out cache writes. They're small when traffic keeps the cache warm, because the prompt is written once and then read many times.
Here's the same OpenAI API cost math for three common workloads across four models:
Monthly workload | GPT-6.2 Astra | GPT-6.2 Sol | GPT-6.1 Terra | GPT-6 Luna |
Side project: 1,000 requests, 1,000 input and 500 output tokens each | $28 | $7 | $3.50 | $0.35 |
Support chatbot: 100,000 requests, 2,000 input (1,500 cached) and 300 output tokens each | $1,660 | $415 | $207.50 | $21.50 |
Same chatbot without caching | $2,800 | $700 | $350 | $35 |
Document summaries: 1M documents, 1,500 input and 200 output tokens each, Batch API | $10,000 | $2,500 | $1,250 | $125 |
Two patterns stand out. Model choice matters most: the same chatbot costs 77x more on GPT-6.2 Astra than on GPT-6 Luna.
And output dominates in chat apps. In the GPT-6.2 Sol chatbot, 300 output tokens cost more than twice as much as 2,000 input tokens.
To check your own numbers, look at the usage fields each API response returns (input, cached and output tokens) and at the usage page in your OpenAI dashboard.
Real traffic is the best estimate.
What else affects your OpenAI API bill
Text tokens aren't your whole OpenAI API cost.
Tools, audio, images and embeddings have their own prices:
Item | Price |
Web search | $10 per 1,000 calls, plus the search content tokens |
File search | Storage $0.10 per GB per day (first GB free); tool calls $2.50 per 1,000 (Responses API only) |
Containers (code execution) | From $0.03 (1 GB) to $1.92 (64 GB) per 20-minute session, billed by the minute with a 5-minute minimum |
gpt-realtime-2.1 (voice) | Audio $32 input / $64 output per 1M tokens; text $4 / $24 |
gpt-realtime-2.1-mini | Audio $10 / $20 per 1M tokens; text $0.60 / $2.40 |
GPT-Live | $0.05 per minute active, $0.02 per minute on standby |
Live transcription / live translation | $0.017 / $0.034 per minute |
Whisper (whisper-1, deprecated) | $0.006 per minute |
gpt-image-2.6 | Image input $8, image output $30, text input $5 per 1M tokens |
text-embedding-3-small / -large | $0.02 / $0.13 per 1M tokens |
A few notes on these:
-
OpenAI Responses API cost. Tokens are priced per model, but the Responses API is where most built-in tools run, and file search tool calls are billed only there. Each tool call adds to the request's cost. Our comparison of the Chat Completions and Responses APIs explains when each one fits.
-
OpenAI realtime API cost. Voice is the most expensive way to use OpenAI. Audio output on gpt-realtime-2.1 costs $64 per 1M tokens, so the mini model is worth testing first.
-
OpenAI Whisper API cost. The whisper-1 model page still lists $0.006 per minute, but OpenAI marks it deprecated, so plan new projects around the newer transcription options.
-
OpenAI embedding API cost. Embeddings are cheap: embedding 100 million tokens with text-embedding-3-small costs $2.
The Azure OpenAI API cost is set by Microsoft, not OpenAI. On Azure's pricing page (East US, checked November 30, 2026), Global deployments of the GPT-6.2 and GPT-6.1 models match OpenAI's prices.
Data Zone deployments cost 10% more; GPT-6.2 Sol, for example, is $2.20 / $11.
Does an OpenAI API key cost money
No. Creating an API key is free; you pay only for what you use with it. The real OpenAI API key cost is the prepaid balance you need before the key works.
According to OpenAI's help article on setting up prepaid API billing:
-
new API accounts use prepaid billing;
-
the minimum credit purchase is $5, and the default is $10;
-
purchased credits expire after one year (180 days for credits bought in Japan after November 13, 2026), and they're generally non-refundable;
-
when the balance runs out, requests fail with a credit_balance_exhausted error;
-
auto recharge can top you up automatically, with a $5 minimum.
In short, the cost of OpenAI API key access is $5 up front, spent down as you use it. Buy small amounts at first: credits you don't use within a year are lost.
The API is not included in ChatGPT. OpenAI's article on billing for ChatGPT and the API platform says they "have separate billing systems". A ChatGPT Plus subscription ($20 a month) doesn't pay for API calls.
Some eligible subscriptions may come with promotional API credits, but billing stays separate.
As your spend grows, OpenAI moves your organization up usage tiers (Build, Launch, Grow) with higher rate limits. Those limits cap how fast you can spend, not your OpenAI API cost per token.
Our guide to OpenAI API rate limits and 429 errors covers them.
How to reduce OpenAI API costs
Most savings on OpenAI API cost come from a few changes. In rough order of impact:
-
Use the smallest model that does the job. GPT-6 Luna costs 1/20 of GPT-6.2 Sol. Test classification, extraction, routing and short replies on Luna first, and send only hard requests to bigger models.
-
Put stable content first so it caches. Keep the system prompt, tool definitions and reference documents at the start of the prompt, unchanged, and put the user's message last. Cached input costs 90–95% less. OpenAI's prompt caching guide explains the rules.
-
Move non-urgent work to Batch, Flex or background mode. That's 30% to 50% off for the same tokens.
-
Cap output. Output costs 5x input. Ask for concise answers, set max_output_tokens (it also limits reasoning tokens), and request structured output instead of prose when code will read it.
-
Stay under 272K input tokens. Retrieve the relevant passages instead of sending whole documents, and trim old conversation turns.
-
Avoid Fast mode by default. Use it only where a person is waiting on the answer.
-
Set budgets and alerts. Use an auto-recharge monthly limit and watch the usage page, so a bug in a loop can't drain your credits.
For a broader playbook that covers every provider, see our guide to LLM API cost optimization.
Route each request to the right model, with one bill.
ScriptRun's OpenAI-compatible API gives you one key for OpenAI, Claude and Gemini models, with "smart routing to save costs" and a single billing system.
Send simple requests to a cheap model and hard ones to a flagship, without managing separate accounts. Learn how model routing works.
OpenAI API cost vs Claude, DeepSeek and others
How does the OpenAI API cost compare with other providers? Standard list prices per 1M tokens, checked November 30, 2026:
Model | Input | Cached input | Output | Long prompts |
OpenAI GPT-6.2 Astra | $8.00 | $0.40 | $40.00 | Higher rates above 272K tokens |
Claude Opus 5.5 | $4.00 | $0.20 | $20.00 | Same price up to 1M tokens |
OpenAI GPT-6.2 Sol | $2.00 | $0.10 | $10.00 | Higher rates above 272K tokens |
Claude Sonnet 5.5 | $2.00 | $0.10 | $10.00 | Same price up to 1M tokens |
OpenAI GPT-6 Luna | $0.10 | $0.01 | $0.50 | Higher rates above 272K tokens |
Claude Haiku 5.5 | $0.10 | $0.01 | $0.50 | $0.50 / $2.50 above 100K tokens |
DeepSeek Flash (peak) | $0.30 | $0.006 | $1.20 | Same price up to 1M tokens |
DeepSeek V4 Pro (peak) | $1.32 | $0.044 | $3.96 | Same price up to 1M tokens |
Claude API cost vs OpenAI
At the mid and budget tiers, list prices are identical. GPT-6.2 Sol and Claude Sonnet 5.5 both cost $2 / $10, and GPT-6 Luna and Claude Haiku 5.5 both cost $0.10 / $0.50.
At the top tier, Anthropic's pricing page lists Claude Opus 5.5 at half the price of GPT-6.2 Astra. The real difference is long prompts: Opus 5.5 and Sonnet 5.5 keep one price up to 1M tokens, while OpenAI's rates rise above 272K and Haiku 5.5's rise above 100K.
See every Claude model in our Claude API pricing guide.
DeepSeek vs OpenAI API cost
DeepSeek's pricing page sets off-peak rates at half the peak rates above (Flash drops to $0.15 / $0.60). Peak hours are 01
–04 and 06–10 UTC on weekdays, excluding Chinese public holidays.Cached input on DeepSeek is far cheaper than on OpenAI. GPT-6 Luna still has lower input and output list prices than DeepSeek Flash, even off-peak, so the cheaper option depends on how much of your input is cached and when your traffic runs.
For the full cross-provider ranking, including open-weight models, see our list of the cheapest LLM APIs with verified prices.
The bottom line on OpenAI API cost
OpenAI API cost comes down to model choice first, then tokens, then options. GPT-6 Luna handles high-volume work for cents, GPT-6.2 Sol covers most apps, and GPT-6.2 Astra is for the hardest tasks at 4x Sol's price.
Caching, Batch and Flex can cut a bill in half or more, while long prompts and Fast mode can double it. Estimate with the formula, then check against real usage.
If you're mixing OpenAI with other providers, ScriptRun's OpenAI-compatible API gives you one key and one bill for all of them.
FAQs about OpenAI API Cost
How much does OpenAI API cost?
It depends on the model and on how many tokens you use. Per 1 million tokens, GPT-6 Luna costs $0.10 input and $0.50 output, GPT-6.2 Sol costs $2 and $10, and GPT-6.2 Astra costs $8 and $40. Cached input is 90–95% cheaper, and the Batch API halves the price.
How much is OpenAI API cost?
The cheapest of OpenAI's recommended models, GPT-6 Luna, costs $0.10 per 1M input tokens and $0.50 per 1M output tokens. The priciest model on OpenAI's pricing table above, GPT-6 Astra, costs $10 and $50. Most apps land in between on GPT-6.2 Sol at $2 and $10. There's no monthly fee; you prepay credits and pay only for usage.
Does OpenAI API key cost money?
Creating the key is free. To use it, you need a prepaid credit balance: the minimum purchase is $5, and credits expire after one year. Usage is then deducted per token.
Does using OpenAI API cost money?
Yes. API usage is billed per token from your prepaid credits, separately from any ChatGPT subscription. ChatGPT Plus doesn't include API usage. If you want to experiment without paying, our guide to free LLM API providers covers the options and their limits.
How much does it cost to use OpenAI API?
You need $5 in credits to start. After that, a light side project (1,000 requests a month) costs about $0.35 on GPT-6 Luna or $7 on GPT-6.2 Sol. Use the formula above with your own token counts for a precise figure.
How much does OpenAI API cost per month?
There's no fixed monthly price; it scales with usage. In our examples, a support chatbot with 100,000 requests a month costs about $21.50 on GPT-6 Luna, $415 on GPT-6.2 Sol and $1,660 on GPT-6.2 Astra, with a cached system prompt. Without caching, the GPT-6.2 Sol version costs $700.
How to reduce OpenAI API costs?
Use the smallest model that works, keep stable prompt content at the start so it gets cached, run non-urgent jobs through the Batch API or Flex at 50% off, cap output length, keep prompts under 272K tokens, and use Fast mode only where speed matters.
Related posts
Zapier Alternatives: 8 Tools Compared on Price (2026)
Zapier alternatives compared: what each tool costs, how it counts usage, a 10,000-action cost example, and open-source and enterprise picks.
LLM Vision API: Processing Images and PDFs Across OpenAI, Claude, and Gemini
Run images and PDFs through OpenAI, Claude, and Gemini from one OpenAI-compatible LLM vision API. Includes Python and TypeScript base64 examples, 2026 token math, pre-resizing, JSON extraction, and async Workflow API batch jobs.
What Is OpenRouter? How It Works, Pricing and Limits (2026)
What is OpenRouter and should you use it? How the gateway works, what it costs, free limits, Auto Router and Fusion, privacy and who owns it.
OpenAI API Alternative: 8 Providers Compared for 2026
Eight OpenAI API alternatives compared on current prices, speed, context and what changes when you switch, with a checklist and a gateway option.








