Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Cost levers - verified

How to cut your OpenAI API bill

Prompt caching: automatic and explicit. Cache lifetime: 30 min (GPT-5.6+); earlier models 5 to 10 min, up to 24 hours. A cache hit typically saves 90% on input across 24 current models. Batch: 50% off, 24h. Batch and caching stack: not stated. Service tiers: Flex (50% off (Batch API rates)), Fast (2x), Ultrafast (6x).

Read from developers.openai.com. Compare every provider's cost levers

Caching
Automatic and explicit
Cache hit saves
90%
Batch
50% off
Service tiers
3

Prompt caching

Mode

Both: automatic caching by default, plus explicit breakpoints you control

Implicit (automatic) on all supported models; explicit breakpoints only on GPT-5.6 and later. Earlier models are implicit only.

Cache lifetime

GPT-5.6 and later: 30 minutes minimum after the latest write or reuse (prompt_cache_options.ttl = "30m", the only value), refreshed on reuse. Earlier models: in_memory typically 5 to 10 minutes inactive, up to one hour; 24h extended retention up to 24 hours on listed models.

Minimum prompt

GPT-5.6 and later: 1,024 visible input tokens. Earlier models: varies by request settings.

Cache write cost

GPT-5.6 and later: cache writes 1.25x the uncached input rate. GPT-5.5 and earlier: no additional cache-write charge.

Cache read cost

GPT-5.6 and later: 0.1x uncached input (0.05x for GPT-6.1 Sol). Earlier models: model-dependent cached-input rate.

Storage cost
Not stated
How to enable

On by default. On GPT-5.6+ choose prompt_cache_options.mode implicit or explicit and mark breakpoints with prompt_cache_breakpoint on a content block.

Request fragment
"prompt_cache_breakpoint": { "mode": "explicit" }
From the docs
“Prompt caching is enabled by default for supported OpenAI models.”
“Both implicit and explicit caching are supported, where explicit caching gives you more control over which context is written to cache.”
“Only implicit caching is supported.”
“Use `prompt_cache_options.ttl` to control the minimum cache lifetime. The only supported value, `30m`, is also the default. A cached prefix remains eligible for reuse for 30 minutes after its most recent write or reuse, though OpenAI may retain it longer.”
“`in_memory`: Entries typically remain active for around 5 to 10 minutes of inactivity, up to one hour.”
“`24h`: Extended retention typically keeps entries available for around 30 minutes and can retain them for up to 24 hours.”
“reusing the prefix refreshes its lifetime without another cache-write charge.”
“The minimum cacheable prompt length is 1,024 tokens for GPT-5.6 and later and varies by request settings for earlier models.”
“For GPT-5.6 and later, cache writes cost 1.25× the standard, uncached input-token rate. Subsequent reads cost 0.1× that rate on most of these models and 0.05× on GPT-6.1 Sol.”
“| Cache write charge | 1.25× the uncached input-token rate | No additional cache-write charge | No additional cache-write charge |”
“Cache-write pricing is not an additive fee: input tokens use the uncached-input, cached-input, or cache-write rate.”
“Set `prompt_cache_options.mode` to `explicit` to use only developer-selected breakpoints and mark each desired breakpoint by adding `prompt_cache_breakpoint: { "mode": "explicit" }` to a supported content block inside an input message.”
“Each request can create up to four cache writes.”

Sources: developers.openai.com/api/docs/guides/prompt-caching, developers.openai.com/api/docs/pricing

Batch API

Discount

50% off

50% off

Window

completion_window must be 24h; each batch completes within 24 hours (often sooner)

Limits

Up to 50,000 requests per batch; input file up to 200 MB; up to 2,000 batch creations per hour; separate rate-limit pool

Endpoint

POST /v1/batches (input lines target /v1/responses, /v1/chat/completions, /v1/embeddings, /v1/completions, /v1/moderations, /v1/images/generations, /v1/images/edits)

Stacks with caching

Not stated: the provider's pages do not say

From the docs
“Better cost efficiency: 50% cost discount compared to synchronous APIs”
developers.openai.com
“Each batch completes within 24 hours (and often more quickly)”
developers.openai.com
“For now, the completion window can only be set to `24h`.”
developers.openai.com
“A single batch may include up to 50,000 requests, and a batch input file can be up to 200 MB in size.”
developers.openai.com
“You can create up to 2,000 batches per hour.”
developers.openai.com
“You will be charged for tokens consumed from any completed requests.”
developers.openai.com

Service tiers

Flex trades speed or availability for a lower price; Priority and Fast cost more for lower latency or reserved capacity.

Flex

Flex processing

Set with service_tier: flex

Price effect

Priced at Batch API rates (50% of standard on the pricing page), plus caching discounts

Derived from the pricing table. The 50% figure is not stated on the Flex page. It combines the quoted "Tokens are priced at Batch API rates" with the Batch guide's quoted 50% discount, and matches the pricing page, where every Flex column is half the Standard column.

Trade-off

Slower responses and occasional 429 Resource Unavailable (not charged); beta, limited models

From the docs
“Flex processing provides lower costs for Responses or Chat Completions requests in exchange for slower response times and occasional resource unavailability.”
“Tokens are priced at Batch API rates, with additional discounts from prompt caching.”
“Flex processing may sometimes lack sufficient resources to handle your requests, resulting in a `429 Resource Unavailable` error code. You will not be charged when this occurs.”

Sources: developers.openai.com/api/docs/guides/flex-processing, developers.openai.com/api/docs/pricing

Fast

Fast mode (formerly Priority processing)

Set with service_tier: fast or priority

Price effect

Per-token premium over Standard; documented as 2x Standard for GPT-5.6 Sol, and the pricing page Fast table is 2x Standard for the GPT-6 family

Derived from the pricing table. Only the GPT-5.6 Sol 2x is stated in prose. The GPT-6 family 2x is computed from the pricing page tables: Fast input/output divided by Standard input/output (gpt-6-astra $20/$10, gpt-6.1-sol $4/$2, gpt-6-luna $0.20/$0.10).

Trade-off

Up to 2.5x faster and more consistent latency; may be downgraded to standard (billed at standard) if traffic ramps too fast

From the docs
“Fast mode delivers up to 2.5× faster speeds and more consistent latency with pay-as-you-go pricing.”
“Priority processing was renamed Fast mode on July 30, 2026.”
“Fast mode charges a per-token premium over Standard processing.”
“For GPT-5.6 Sol, Fast mode costs twice the corresponding Standard rate.”
“If your traffic ramps too fast, the system may downgrade some Fast mode requests to standard speeds and charge standard rates.”
“Cached input discounts still apply to Fast mode requests.”

Sources: developers.openai.com/api/docs/guides/fast-mode, developers.openai.com/api/docs/pricing

Fast

Ultrafast mode

Set with service_tier: ultrafast

Price effect

Higher cost; pricing page Ultrafast table is 6x Standard for GPT-6 Astra and GPT-6.1 Sol

Derived from the pricing table. The 6x figure is not stated as a rule. Computed from the pricing page Ultrafast table divided by the Standard table: gpt-6-astra input $60 vs $10, gpt-6.1-sol input $12 vs $2 (output and cached columns give the same ratio).

Trade-off

Fastest tier; separate rate limits; WebSockets recommended

From the docs
“Ultrafast mode is the fastest service tier in the OpenAI API. It is broadly available for GPT-6 Astra and GPT-6.1 Sol. Use it when speed justifies the higher cost.”
“Ultrafast has separate rate limits from Standard and Fast modes.”
“Set `model` to `gpt-6-astra` or `gpt-6.1-sol` and `service_tier` to `ultrafast` in each `response.create` event.”

Sources: developers.openai.com/api/docs/guides/ultrafast-mode, developers.openai.com/api/docs/pricing

Other discounts and surcharges

  • Scale Tier (purchased TPM capacity)

    “Scale Tier and Fast mode are separate. Fast mode requests have separate billing and don't count against purchased Scale Tier TPM bundles.”
    developers.openai.com
  • Annual Enterprise spend commitment

    “All processing modes count toward your annual Enterprise spend commitment”
    developers.openai.com
  • Surcharge to avoid: regional processing (data residency) +10%

    “Regional processing (data residency) endpoints are charged a 10% uplift for models released on or after March 5, 2026.”
    developers.openai.com

OpenAI per-model prices

USD per 1M tokens from the provider's own pricing page, newest release first. A dash means the model has no such rate. Muted rows are scheduled for shutdown or deprecated.

OpenAI models with input, cache, batch, output and fast mode prices per 1M tokens
ModelInputCached inputCache writeBatch inputOutputBatch outputFast modeinput / output
GPT-6.1 Sol$2$0.1095% off$2.50$1$10$5$4 / $20
GPT-6 Luna$0.10$0.0190% off$0.125$0.05$0.50$0.25$0.20 / $1
GPT-6 Sol$2$0.2090% off$2.50$1$10$5$4 / $20
GPT-6 Astra$10$190% off$12.50$5$50$25$20 / $100
GPT-5.6 Cyber$12.50$1.2590% off$15.625-$75--
GPT-5.6 Luna$0.20$0.0290% off$0.25$0.10$1.20$0.60$0.40 / $2.40
GPT-5.6 Sol$4$0.4090% off$5$2$20$10$8 / $40
GPT-5.6 Terra$2$0.2090% off$2.50$1$12$6$4 / $24
GPT-5.5$5$0.5090% off-$2.50$30$15$12.50 / $75
GPT-5.5 Pro$30--$15$180$90-
GPT-5.4 Mini$0.75$0.07590% off-$0.375$4.50$2.25$1.50 / $9
GPT-5.4 nanoScheduled for shutdown or deprecated$0.20$0.0290% off-$0.10$1.25$0.625-
GPT-5.4$2.50$0.2590% off-$1.25$15$7.50$5 / $30
GPT-5.3-CodexScheduled for shutdown or deprecated$1.75$0.17590% off--$14-$3.50 / $28
GPT-5.2$1.75$0.17590% off-$0.875$14$7$3.50 / $28
GPT-5.1Scheduled for shutdown or deprecated$1.25$0.12590% off-$0.625$10$5$2.50 / $20
GPT-5 Pro$15--$7.50$120$60-
GPT-5$1.25$0.12590% off-$0.625$10$5$2.50 / $20
GPT-5 Mini$0.25$0.02590% off-$0.125$2$1$0.45 / $3.60
GPT-5 nano$0.05$0.00590% off-$0.025$0.40$0.20-
o3-pro$20--$10$80$40-
o3$2$0.5075% off-$1$8$4$3.50 / $14
o4-mini$1.10$0.27575% off-$0.55$4.40$2.20$2 / $8
GPT-4.1$2$0.5075% off-$1$8$4$3.50 / $14
GPT-4.1 Mini$0.40$0.1075% off-$0.20$1.60$0.80$0.70 / $2.80
GPT-4.1 nanoScheduled for shutdown or deprecated$0.10$0.02575% off-$0.05$0.40$0.20$0.20 / $0.80
o1-pro$150--$75$600$300-
o3-mini$1.10$0.5550% off-$0.55$4.40$2.20-
o1$15$7.5050% off-$7.50$60$30-
GPT-4o Mini$0.15$0.07550% off-$0.075$0.60$0.30$0.25 / $1
GPT-4o$2.50$1.2550% off-$1.25$10$5$4.25 / $17
GPT-4 TurboScheduled for shutdown or deprecated$10--$5$30$15-
Chat Latest$5$0.5090% off--$30--
GPT-3.5 Turbo$0.50--$0.25$1.50$0.75-
GPT-3.5 Turbo Instruct$1.50---$2--
GPT-4$30--$15$60$30-

Research notes

Fast (GPT-6 family) and Ultrafast multipliers are computed from the pricing tables, not stated as rules; see the derived entries.

FAQ

Does OpenAI cache prompts automatically?

Both: automatic caching by default, plus explicit breakpoints you control. Implicit (automatic) on all supported models; explicit breakpoints only on GPT-5.6 and later. Earlier models are implicit only. How to enable: On by default. On GPT-5.6+ choose prompt_cache_options.mode implicit or explicit and mark breakpoints with prompt_cache_breakpoint on a content block.

How much does a cache hit cost on OpenAI?

Across 24 current models with a cache read price, a hit saves 90% (50% to 95%) off the input price. The docs say: GPT-5.6 and later: 0.1x uncached input (0.05x for GPT-6.1 Sol). Earlier models: model-dependent cached-input rate..

Does OpenAI have a batch API discount?

50% off. Window: completion_window must be 24h; each batch completes within 24 hours (often sooner). Stacks with caching: not stated: the provider's pages do not say.

What service tiers does OpenAI offer?

Flex: Priced at Batch API rates (50% of standard on the pricing page), plus caching discounts (derived from the pricing table). Fast: Per-token premium over Standard; documented as 2x Standard for GPT-5.6 Sol, and the pricing page Fast table is 2x Standard for the GPT-6 family (derived from the pricing table). Ultrafast: Higher cost; pricing page Ultrafast table is 6x Standard for GPT-6 Astra and GPT-6.1 Sol (derived from the pricing table).

Sources

Last verified from OpenAI's own pages below. Quotes are verbatim; each was matched against the live page.

Newsletter

Know when a provider changes its prices

One email per week. New model releases, pricing changes and what they mean for what you build.