TL;DR: OpenAI API pricing is pay-as-you-go and metered per token. As of the OpenRouter snapshot pulled July 10, 2026, rates run from $0.05 per 1M input tokens (gpt-5-nano) to $30.00 per 1M output on the GPT-5.6 flagship tier. There is no flat fee. Picking a nano or mini model instead of a flagship cuts the same workload's bill 5x to 25x. Cheapest usable production model: gpt-5-nano.
Search "openai api pricing" and Google answers with an AI Overview stitched from vendor blogs. In the July 10, 2026 snapshot for this query, its table stops at GPT-5.5 and lists o4-mini at $0.55/$2.20; the live OpenRouter feed already carries the GPT-5.6 family that shipped July 9 and shows o4-mini at $1.10/$4.40. Static articles go stale the week a model ships. This page reads OpenRouter live pricing from a dated snapshot and adds the layer nobody publishes: what each price costs on a real workload, and where a cheaper model does the same job.
Disclosure: we have no affiliate or paid relationship with OpenAI as of publication. We pull prices from OpenRouter 's public model feed; how we use that feed is documented in our OpenRouter review . Prices last verified July 10, 2026.
OpenAI API pricing right now (live table)
OpenAI API pricing is pay-as-you-go and metered per token. As of the OpenRouter snapshot of July 10, 2026, rates run from $0.05 per 1M input tokens on gpt-5-nano to $30.00 per 1M output on the GPT-5.6 flagship. Input and output are billed separately, and output usually costs 4x to 8x more than input. In full: gpt-5-nano runs $0.05 input and $0.40 output; the GPT-5.6 Sol flagship $5.00 and $30.00. Roughly 1M tokens equals 750,000 words.
| Model | Input /1M | Output /1M | Cached input /1M | Context | Tier |
|---|---|---|---|---|---|
| gpt-5-nano | $0.05 | $0.40 | $0.01 | 400K | Ultra-budget |
| gpt-4o-mini | $0.15 | $0.60 | $0.075 | 128K | Budget chat |
| gpt-4.1-nano | $0.10 | $0.40 | $0.025 | 1.05M | Ultra-budget, long context |
| gpt-5-mini | $0.25 | $2.00 | $0.025 | 400K | Production mini |
| gpt-5.1 | $1.25 | $10.00 | $0.13 | 400K | Mainline workhorse |
| gpt-5.1-codex | $1.25 | $10.00 | $0.13 | 400K | Coding |
| o4-mini | $1.10 | $4.40 | $0.275 | 200K | Reasoning, budget |
| gpt-4.1 | $2.00 | $8.00 | $0.50 | 1.05M | Long-context workhorse |
| gpt-4o | $2.50 | $10.00 | - | 128K | Legacy workhorse |
| gpt-5.6-luna | $1.00 | $6.00 | $0.10 | 1.05M | New budget flagship |
| gpt-5.6-terra | $2.50 | $15.00 | $0.25 | 1.05M | New standard flagship |
| gpt-5.6-sol | $5.00 | $30.00 | $0.50 | 1.05M | New top flagship |
| gpt-5-pro | $15.00 | $120.00 | - | 400K | Max reasoning |
Source: OpenRouter /api/v1/models snapshot, fetched July 10, 2026. Prices are per 1M tokens. OpenRouter passes first-party OpenAI list rates through at par, so these match OpenAI's own price per token; verify a specific number before you budget a large job.
OpenAI models grouped by job, with per-million-token prices.
Two catches the AI Overview misses. The GPT-5.6 family (Luna, Terra, Sol) carries canonical slugs dated 2026-07-09, and the AIO's table has not picked it up. And when a page's cost per million tokens is a screenshot from six weeks ago, it misprices your context window cost on any recent model. One note on API tiers. OpenAI's usage tiers 1 through 5 do not change the per-token price. They only raise your rate limits as your spend history grows.
GPT-5 API cost per real workload (3 scenarios)
GPT-5 API cost only means something against a workload. Here are three, each priced on the July 10, 2026 snapshot. A Hacker News thread asks how people forecast AI API costs for agent workflows. The answer this table gives: the model you pick swings the same task 5x to 25x. A token calculator that multiplies one rate hides that.
| Workload | Volume | Cheap model | Mid model | Flagship |
|---|---|---|---|---|
| Support chatbot (1.5K in + 400 out per msg) | 50,000 msgs | $23.25 (gpt-4o-mini) | $58.75 (gpt-5-mini) | $293.75 (gpt-5.1) |
| Doc batch (3K in + 300 out per doc) | 100,000 docs | $27.00 (gpt-5-nano) | $63.00 (gpt-4o-mini) | $675.00 (gpt-5.1) |
| Agent loop (8K in + 800 out per call) | per 1 action | $0.05 to $0.54 (gpt-5.1-codex, 3 to 30 calls) |
Computed from snapshot per-token rates. Batch and caching discounts below cut these further.
The chatbot shows the mini-vs-flagship gap: 50,000 conversations cost $23.25 on gpt-4o-mini or $293.75 on gpt-5.1, a 12x difference for a job most bots do fine on a mini. The agent loop breaks budgets. A single user action fans out into 3 to 30 model calls (tool use, retries, reasoning steps), so its cost is a range, not a number. At 1,000 actions per month averaging 15 calls each, that is about $270 on gpt-5.1-codex before caching. Pad the forecast for the tail, not the average.
Batch API and caching: when the discounts apply
Two discounts cut OpenAI bills, and both apply only to specific patterns. Batch API discounts take 50% off input and output. The condition: submit work asynchronously and accept results within 24 hours (OpenAI's published Batch policy). Prompt caching discounts drop repeated input tokens to roughly one-tenth of list, and the snapshot prices them per model.
Caching is visible in the table above. gpt-5.1 input drops from $1.25 to $0.13 per 1M on a cache hit, a 90% cut; gpt-4o-mini goes $0.15 to $0.075. Caching only helps when a large, stable prefix repeats across calls, which is exactly the agent-loop and long-system-prompt case. Applied to the agent loop, a 70%-cached prefix takes gpt-5.1-codex from $0.018 to about $0.0117 per call, roughly 35% off. Batch fits the document backlog: the 100,000-doc job on gpt-5-nano falls from $27.00 to $13.50. Neither discount helps a real-time chatbot, where each request is fresh and answers cannot wait 24 hours.
OpenAI API vs ChatGPT subscription: which pays off
The API has no usage caps and no flat fee. ChatGPT Plus lists at $20 per month and ChatGPT Pro at $200 (OpenAI's flat consumer plans), both rate-limited. The PAA question "Is the GPT API cheaper than ChatGPT ?" has no single answer; it turns on how you use it.
$20 of API spend buys about 16M input tokens or 2M output tokens on gpt-5.1. A heavy chat user in one window blows past that. The flat plan is cheaper for them, until the caps bite. That is the friction. One widely-shared r/ClaudeAI post put it plainly: "Two compounding usage caps on the $20 plan are why OpenAI keeps my money." Subscribers hit walls mid-task with, as another refugee thread admitted, "ZERO knowledge about tokens" to plan around. The API removes the cap and the mystery: you see the meter, never get locked out, and route cheap models to cheap tasks. Spiky, automated, or product-embedded work wins on the API; all-day single-window chat wins on the subscription. For the model choices behind those routes, see best LLM for coding .
Cheaper alternatives for the same tasks
The cheapest model for production is often not an OpenAI model. Matched by task tier on the same snapshot, here is where a swap does the same job for less.
| Task tier | OpenAI | Cheaper same-job swap |
|---|---|---|
| High-volume classify/extract | gpt-5-nano $0.05/$0.40 | DeepSeek V4 Flash $0.09/$0.18 (half the output); Gemini 2.5 Flash-Lite $0.10/$0.40, 1M context |
| Workhorse | gpt-4.1 $2.00/$8.00 | DeepSeek V4 Pro $0.44/$0.87; Gemini 2.5 Pro $1.25/$10.00 |
| Flagship | gpt-5.6-sol $5.00/$30.00 | Gemini 3.1 Pro $2.00/$12.00; Claude Opus 4.8 $5.00/$25.00 |
Gemini Flash pricing undercuts gpt-5-nano's output rate at the budget tier while carrying an eight-times-larger context window. A workhorse job billing $8.00 per 1M output on gpt-4.1 runs $0.87 on DeepSeek V4 Pro. That is roughly 9x cheaper, at the cost of a slower non-OpenAI ecosystem. Claude Opus pricing sits at $5.00 input and $25.00 output, below the GPT-5.6 Sol flagship on output. The catch: benchmark quality, latency, and tooling differ, so price is one axis, not the verdict. Compare the full lineup on Claude API pricing and Claude vs ChatGPT .
Match the workload to a cheaper swap, with live per-million-token rates.