Contents
How does OpenAI API pricing work? What is GPT-5.6 pricing after the July 30 cut? What do the other OpenAI models cost? Does OpenAI charge more for long context? How do you calculate OpenAI API costs? Azure OpenAI pricing vs the direct API: which should you use? How does OpenAI pricing compare to Claude and Gemini? How do you reduce OpenAI API costs? How does CloudZero track and optimize OpenAI spend? Frequently asked questions about OpenAI API pricing

Quick Answer

OpenAI API pricing is billed per million tokens, and the ladder just moved. After OpenAI's July 30, 2026 price cut, GPT-5.6 Sol costs $5 input / $30 output per million tokens, GPT-5.6 Terra costs $2/$12 (down 20%), and GPT-5.6 Luna costs $0.20/$1.20 (down 80%). Cached input bills at 10% of standard rates and the Batch API halves everything. Watch the long-context meter: past the standard window, rates roughly double.

One CloudZero customer, an AI-powered search tool, connected its billing data and confirmed what it couldn’t see before: OpenAI accounted for 25% of its total cloud spend. Not a line item. A quarter of the bill. Nobody had decided that; it had accumulated, one API call at a time.

That discovery is about to get more common, because OpenAI pricing is now a moving target. On July 30, 2026, OpenAI cut GPT-5.6 Terra by 20% and Luna by 80%, the largest price move since the GPT-5 launch, and the clearest sign yet that frontier AI is in a price war. Cheaper tokens sound like good news for budgets. In practice, cheaper tokens mean more usage, more experiments, and more teams shipping AI features, which is how a quarter of the cloud bill happens.

As CloudZero founder and CTO Erik Peterson warns, AI spend is surging while most companies lack “the visibility to know whether it’s driving returns.

The numbers back him up: in CloudZero’s 2026 AI ROI survey of 260 finance leaders, 42% admitted they approved AI spending without reliable cost projections.

This guide is the antidote: every current rate, verified against OpenAI’s own pricing announcement, plus the multipliers OpenAI doesn’t put in the headline.

How does OpenAI API pricing work?

The API is a meter. You pay for tokens processed: one rate for input tokens (what you send, including your system prompt and context) and a higher rate for output tokens (what the model writes back). On the GPT-5.6 family, output costs exactly 6x input across every tier, which means long responses, not long prompts, dominate most bills.

A token is roughly three-quarters of an English word, and rates are quoted per million tokens (1M tokens is about 750,000 words). There is no subscription and no ceiling: OpenAI API billing runs on prepaid credits that draw down as you consume, and the API key itself is free. You pay only for usage.

One recurring confusion worth settling: there is no separate ChatGPT API. OpenAI ChatGPT API pricing and OpenAI API pricing are the same thing, so your ChatGPT API cost is simply your token bill on whichever model you call. The ChatGPT consumer and business plans are a different product with seat-based pricing, covered in CloudZero’s ChatGPT cost guide.

What is GPT-5.6 pricing after the July 30 cut?

OpenAI GPT-5 pricing now centers on the GPT-5.6 family, which reached general availability on July 9, 2026 with a 1.05M-token context window across all three tiers.

Three weeks later, OpenAI cut two of the three prices:

ModelModel IDBefore July 30After July 30Change
GPT-5.6 Solgpt-5.6-sol$5.00 / $30.00$5.00 / $30.00Unchanged
GPT-5.6 Terragpt-5.6-terra$2.50 / $15.00$2.00 / $12.00-20%
GPT-5.6 Lunagpt-5.6-luna$1.00 / $6.00$0.20 / $1.20-80%

Rates are input/output per million tokens.

What the cut actually means for your budget:

Luna rewrote the bottom of the market. At $0.20/$1.20, Luna now costs roughly 4x less than GPT-5.4 Mini ($0.75/$4.50) while sitting in the flagship family. High-volume workloads that were priced onto older mini models now have a current-generation home. OpenAI says the cut was funded by inference work that reduced end-to-end serving costs 20%.

Terra now undercuts GPT-5.4. At $2/$12 against GPT-5.4’s $2.50/$15, the “balanced tier” is cheaper than the previous generation’s standard model. If your production workloads still run on GPT-5.4, the migration now pays you.

Sol held, and that’s a signal. The flagship stayed at $5/$30, keeping a 25x input gap between the top and bottom of the family. OpenAI cut where volume lives and held where prestige lives, which tells you where the margin is. Tier choice, not vendor choice, is now the single biggest lever on an OpenAI bill.

Cached input reads bill at 10% of the standard input rate on all three tiers ($0.50 Sol, $0.20 Terra, $0.02 Luna), and cache writes on GPT-5.6 and later bill at 1.25x the input rate. The Batch API halves both input and output for asynchronous jobs completed within 24 hours. Fast mode for Sol replaced Priority Processing in the API on the same day as the price cut, and runs up to 2.5x standard speed. And one modifier that arrived quietly: a 10% regional-processing uplift applies to eligible models released on or after March 5, 2026.

What do the other OpenAI models cost?

The full OpenAI model pricing ladder spans a 150x input spread, from GPT-5.4 Nano’s $0.20 to GPT-5.5 Pro’s $30, with output topping out at $180:

ModelInput (per MTok)Output (per MTok)Status
GPT-5.5 Pro$30.00$180.00Premium reasoning
GPT-5.6 Sol$5.00$30.00Current flagship
GPT-5.5$5.00$30.00Previous flagship
GPT-5.4$2.50$15.00Previous standard
GPT-5.6 Terra$2.00$12.00Current balanced tier
GPT-5.4 Mini$0.75$4.50Legacy efficient
GPT-5.6 Luna$0.20$1.20Current high-volume tier
GPT-5.4 Nano$0.20$1.25Cheapest legacy tier

Note: The rows above Terra are where migrations now pay for themselves.

Beyond chat models, two workhorses matter for OpenAI token pricing math. OpenAI embeddings are nearly free at scale: text-embedding-3-small costs $0.02 per million tokens and text-embedding-3-large costs $0.13, which is why embedding an entire knowledge base often costs less than a single day of chat traffic. OpenAI Whisper API pricing for audio transcription bills per minute rather than per token, at $0.006 per minute for whisper-1, about $0.36 per hour of audio.

One specialty tier sits outside the public ladder entirely: GPT-5.6 Cyber, priced at $12.50 input / $75 output per million tokens with cached input at $1.25, is available only through OpenAI’s Daybreak Red access tier for governed vulnerability research rather than public self-serve access. It’s a reminder that the published table is the floor of OpenAI’s pricing complexity, not the whole of it.

O-series reasoning model pricing

OpenAI’s o-series models are built for multi-step reasoning: math, code debugging, scientific analysis. The catch in the pricing is invisible until the invoice: o-series models bill internal reasoning tokens at output rates, so effective costs run 3x to 10x the base rate depending on task complexity.

Current rates: o4-mini at $1.10/$4.40 per million tokens, o3 at $2.00/$8.00, and o3-pro at $20.00/$80.00. For most reasoning workloads, o4-mini is the value pick; reserve o3-pro for tasks where evaluations prove the accuracy lift.

Fine-tuning pricing

Fine-tuning trains OpenAI models on your data, priced in two parts: training and inference. GPT-4.1 trains at roughly $3.00 per million tokens, with fine-tuned inference at about $3.00 input / $12.00 output, a premium over the base model. GPT-4.1 Mini trains at about $0.80 per million tokens with inference around $0.80/$3.20.

Budget for both halves, because the inference premium persists for the life of the deployment while the training cost is one-time.

Does OpenAI charge more for long context?

Yes, and this is the multiplier that never makes the headline. Requests above roughly 272K input tokens bill the entire request on a separate long-context meter:

ModelStandard rateLong-context rate
GPT-5.6 Sol$5.00 / $30.00$10.00 / $45.00
GPT-5.6 Terra$2.00 / $12.00$4.00 / $18.00
GPT-5.6 Luna$0.20 / $1.20$0.40 / $1.80
GPT-5.4$2.50 / $15.00$5.00 / $22.50

Input doubles and output rises 50% on the long meter, and cached input doubles with it. For agentic workloads that pack the context window with retrieved documents and conversation history, the effective rate can approach 2x the price you budgeted, which is exactly the kind of gap that turns a clean forecast into an overrun nobody saw coming.

This is also the sharpest structural difference from Anthropic: Claude models from 4.6 onward include their full 1M window at standard rates, with no long-context surcharge. The full rate-by-rate matchup lives in CloudZero’s Claude pricing guide.

How do you calculate OpenAI API costs?

The formula behind every OpenAI API cost estimate:

Cost per call = (input tokens / 1,000,000 x input rate) + (output tokens / 1,000,000 x output rate)

Worked example: a support assistant on GPT-5.6 Terra sends a 1,500-token prompt (1,200 of it a cached system prompt) and returns a 400-token response.

  • Uncached input: 300 / 1,000,000 x $2.00 = $0.0006
  • Cached read: 1,200 / 1,000,000 x $0.20 = $0.00024
  • Output: 400 / 1,000,000 x $12.00 = $0.0048
  • Total per call: roughly $0.0057

At 10,000 calls per day, that’s about $1,715/month. The identical workload on Luna runs about $172/month, and on Sol about $4,290/month. Same traffic, a 25x spread, decided entirely by tier choice. For your own numbers, CloudZero’s interactive LLM cost calculator runs this math across OpenAI, Anthropic, and Google models side by side.

Here’s the same logic applied to a heavier real-world workload, a support chatbot handling 10,000 conversations daily at 500 input and 300 output tokens each (150M input, 90M output monthly):

ModelMonthly input costMonthly output costTotal monthly cost
GPT-5.6 Sol$750$2,700$3,450
GPT-5.6 Terra$300$1,080$1,380
GPT-5.6 Luna$30$108$138

Most support chatbots don’t need flagship reasoning, which makes the Luna row the default and the Sol row a decision someone should have to defend.

Answering the questions people actually ask: one million tokens costs $5 on Sol input and $0.20 on Luna input, so “how much is 1M tokens” has a 25x range. Per thousand tokens, the OpenAI token cost is half a cent on Sol input and two hundredths of a cent on Luna. The OpenAI token price sounds like a rounding error at the unit level, which is precisely why nobody notices until the invoice.

Four factors move that invoice more than the rate card itself. Output length dominates, because output bills at 6x input on every GPT-5.6 tier, so an assistant that rambles costs multiples of one that answers tightly.

Reasoning effort compounds it, since reasoning tokens bill as output whether or not they appear in the response. Context accumulation drags conversations toward the long-context meter one appended message at a time.

And retries multiply everything, because a flaky integration that silently retries failed calls pays for every attempt. None of these show up in a rate comparison, and all of them show up in the bill.

Azure OpenAI pricing vs the direct API: which should you use?

Azure OpenAI Service offers the same models through Microsoft’s infrastructure with two billing modes: pay-as-you-go at rates generally comparable to the direct API, and provisioned throughput units (PTUs) that reserve capacity for consistent high-volume inference.

Azure OpenAI pricing wins on compliance, data residency, and private networking; the direct API wins on faster access to new models (Azure typically lags releases like the July 30 cut) and more transparent billing. Many teams run both, which is itself an allocation problem, since the same model then appears on two invoices in two formats. The full breakdown, PTU math included, is in CloudZero’s Azure OpenAI pricing guide.

How does OpenAI pricing compare to Claude and Gemini?

The July cut repositioned OpenAI across the market:

ModelProviderInput (per MTok)Output (per MTok)
Claude Fable 5Anthropic$10.00$50.00
GPT-5.6 SolOpenAI$5.00$30.00
Claude Opus 5Anthropic$5.00$25.00
Claude Sonnet 5 (intro)Anthropic$2.00$10.00
GPT-5.6 TerraOpenAI$2.00$12.00
Gemini 3.1 ProGoogle$2.00$12.00
Claude Haiku 4.5Anthropic$1.00$5.00
DeepSeek V3.2DeepSeek$0.28$0.42
GPT-5.6 LunaOpenAI$0.20$1.20

Three matchups worth knowing. At the flagship tier, Sol and Claude Opus 5 both charge $5 input, but Opus is cheaper on output ($25 vs $30), so output-heavy agentic work tilts toward Anthropic while Sol leads several intelligence benchmarks.

At the mid tier, Terra, Sonnet 5, and Gemini 3.1 Pro all sit at $2 input, the most contested price point in AI, and Sonnet’s rate rises to $3/$15 on September 1 when its introductory window closes. At the bottom, Luna’s cut leapfrogged everything except DeepSeek’s output rate, and undercuts DeepSeek on input.

The pattern across all three tiers: no vendor wins everywhere, which is why the highest-performing teams route by task rather than committing to one provider. The full field, including Grok and open-weight options, is in CloudZero’s LLM API pricing comparison and the broader AI pricing guide.

How do you reduce OpenAI API costs?

Six levers, in the order they usually pay off:

  1. Re-tier after the price cut. Workloads priced onto GPT-5.4 or Mini before July 30 are now paying a premium for older models. Terra beats GPT-5.4 on price and Luna beats Mini by 4x. A routing review is worth real money this quarter.
  2. Route by task complexity. Luna for classification, extraction, and high-volume calls; Terra for production defaults; Sol only where evaluations prove the lift. The Sol-to-Luna spread is 25x.
  3. Cache what repeats. System prompts, tool definitions, and shared context bill at 10% once cached. Structure prompts so stable content leads.
  4. Batch everything that can wait. 50% off both token types for jobs with a 24-hour window.
  5. Watch the long-context meter. Trim retrieval payloads and conversation history before they cross into the 2x zone. Context discipline is now a budget line.
  6. Give every token an owner. CloudZero’s survey found 42% of finance leaders approved AI spending without reliable projections, and unowned spend is how OpenAI becomes 25% of the cloud bill. The attribution framework is in CloudZero’s AI spend management guide.

How does CloudZero track and optimize OpenAI spend?

OpenAI’s usage dashboard shows tokens by API key and project. It cannot tell you which product feature, customer, or team drove the spend, whether the July price cut actually lowered your bill or just raised your usage, or what any of it returned.

CloudZero’s OpenAI integration ingests token-level usage and cost data, and the CostFormation allocation engine maps it to the dimensions a business runs on: cost per customer, per feature, per team, per environment.

The integration is live in production at organizations including a financial services company valued at $85B and a smart building technology company valued at $26B, alongside the AI Hub, which normalizes OpenAI spend next to Anthropic, AWS, Azure, and GCP in one view.

The part that matters in a price-war year: anomaly detection compares the last 36 hours of spend against 12 months of history and alerts the engineer who owns the affected feature when consumption breaks pattern. When prices drop 80% and usage triples a week later, that’s the difference between a deliberate trade and a surprise.

Rate cards tell you what a token costs. Unit economics tell you what your AI features cost per customer served, and whether the answer is trending toward profit. Only one of those runs a business.

Schedule a demo to see how billion dollar organizations such as Toyota, Duolingo, Coinbase, Grammarly, and more connect AI spend to business outcomes. You can also take a self-guided tour to explore cost per customer and AI allocation in action.

Frequently asked questions about OpenAI API pricing