Model / inference API
OpenAI API
Inference provider headquartered in US. Serves models through OpenRouter as "OpenAI".
Checked 2026-10-31
Loading poll...
OpenAI sells GPT through a pay-per-token API. On 2026-10-31 GPT-6 Astra costs $10 in and $50 out per million tokens, GPT-6.1 Sol $2 and $10, GPT-6.1 Terra $1 and $5, and GPT-6 Luna $0.10 and $0.50. API data is not used for training unless you opt in, and abuse logs are kept up to 30 days by default.
Facts at a glance
Item | What OpenAI states | Source |
|---|---|---|
Billing | Per million tokens, prepaid credit, usage tiers | Pricing and rate limit docs |
Flagship | GPT-6 Astra, $10 in / $50 out | Models page |
Mid and small | Sol 6.1 $2/$10, Terra 6.1 $1/$5, Luna $0.10/$0.50 | Models page |
Context | 1,050,000 tokens, 128,000 max output (Astra, Sol, Terra, Luna) | Model pages |
Batch and Flex | 50 percent of standard | Pricing page |
Training on API data | No, unless you opt in | Data controls guide |
Default retention | Abuse logs up to 30 days | Data controls guide |
Zero data retention | By approval | Data controls guide |
Regions | Per-project data residency, by contacting sales | Data controls guide |
Prices checked 2026-10-31. The complete per-model list, including the older GPT-5 family and o-series, is on OpenAI API pricing. Here we cover the vendor: the limits you will meet, the data terms you accept and how to wire agents to it.
Models offered
OpenAI's models page tells you to start with Astra for complex reasoning and coding, choose Sol to balance intelligence and cost, and use Luna for cost-sensitive, high-volume work. Terra sits between them.
Model | Input | Cached input | Output | Reasoning effort options |
|---|---|---|---|---|
GPT-6 Astra | $10.00 | $1.00 | $50.00 | low, medium, high, xhigh, max |
GPT-6.1 Sol | $2.00 | $0.10 | $10.00 | low, medium (default), high, xhigh, max |
GPT-6.1 Terra | $1.00 | $0.05 | $5.00 | none through max |
GPT-6 Luna | $0.10 | $0.01 | $0.50 | none through max |
All four take text and image input and return text. The API also sells image, audio and realtime models, embeddings, fine-tuning and a long tail of older text models. Sol uses a default context window of 500K tokens in the API, with the full 1.05M window needing to be set explicitly.
Modifiers that move the price
Modifier | Effect |
|---|---|
Prompt over 272K input tokens | 2x input and cache rates, 1.5x output, for the whole request |
Batch or Flex | 50 percent of standard |
Fast mode | 2x standard |
Regional processing | 10 percent premium where available |
Cache write, 30 minutes | 1.25x input |
The 272K rule is the one that bites. Astra at $10 and $50 becomes $20 and $75 on a prompt past the line, and the surcharge applies to the entire request, not only the extra tokens. Teams that feed whole repositories into one call should split or trim prompts near the line. Reasoning effort is the other cost dial: higher effort produces more reasoning tokens, which are billed as output.
Rate limits and usage tiers
OpenAI sorts accounts into tiers by how much credit you have bought. The three paid tiers are Build, Launch and Grow, and an organization moves up automatically as total credit purchases reach each threshold.
Tier | Qualification | Usage limit |
|---|---|---|
Free | In an allowed geography | $100 a month |
Build | $5 in total credit purchases | $500 a month |
Launch | $100 in total credit purchases | $5,000 a month |
Grow | $500 in total credit purchases | $200,000 a month |
Per-model requests per minute and tokens per minute depend on your tier and are shown in Settings, under Organization and then Limits. OpenAI also describes ramp-rate limits on sudden jumps in pay-as-you-go traffic, and sells Scale Tier for predictable capacity on eligible models. For the newest models the docs point to reserved capacity.
One practical difference from Anthropic's caps: OpenAI ties the monthly usage limit to cumulative credit purchases, so the quickest way to raise a ceiling is to buy credit, not to open a ticket. Compare the same rule on Anthropic.
Data retention and training
The data controls guide states: "Your data is your data. As of March 1, 2023, data sent to the OpenAI API is not used to train or improve OpenAI models (unless you explicitly opt in to share data with us)."
It then separates two things that people often blur.
- Abuse monitoring logs. Logs generated from your use of the platform, kept so OpenAI can enforce its usage policies. They may contain prompts, responses and metadata such as classifier outputs. By default they are generated for all API feature usage and kept for up to 30 days, unless longer retention is required by law.
- Application state. Some endpoints store state so a feature can work, for example stored responses. Which endpoints do this is listed in a table on the same page.
There are two controls, both by prior approval.
Control | What it does |
|---|---|
Modified Abuse Monitoring | Excludes customer content from abuse monitoring logs across all API endpoints, with the full platform still available |
Zero Data Retention | Does the same, and also forces |
OpenAI reserves the right to make particular models ineligible for either control for specific customers, with written notice, and to do so if needed to investigate severe risk activity. Customers who enable the controls take on responsibility for their own users' compliance with OpenAI's policies and for any moderation and reporting required by law. A "Private Safety Processing" variant lets OpenAI run automated safety checks while keeping ZDR protections. Once approved, you set the controls at organization level, and each project can inherit, pick a different control or switch it off.
Regions
Data residency is a project setting. After you contact sales and are found eligible, you pick a region when you create a new project. Requests go to a regional hostname, for example us.api.openai.com or eu.api.openai.com, which uses Cloudflare Regional Services so that TLS termination happens inside the chosen processing region. The limits are specific.
- Residency does not cover "system data" such as account and usage metadata that holds no customer content.
- For any region other than the United States you must be approved for abuse monitoring controls and sign a Modified Retention amendment.
- If your region does not support regional processing for a model, OpenAI may process and temporarily store content elsewhere.
- Data residency endpoints carry a 10 percent uplift for models released on or after 5 March 2026 that are eligible.
Which agents can use it, and how
Codex CLI is the obvious fit and uses an API key or a ChatGPT sign-in. To point the built-in OpenAI provider at a proxy, a router or a residency-enabled project, OpenAI's Codex docs say to set openai_base_url in config.toml:
openai_base_url = "https://us.api.openai.com/v1"For a wholly different endpoint, define a provider and select it:
model_provider = "proxy"
[model_providers.proxy]
name = "Proxy"
base_url = "https://proxy.example.com/v1"
env_key = "PROXY_API_KEY"See Codex CLI and Codex pricing for the plan against API-key choice. Other agents connect with a key. OpenCode uses /connect and then /models, and Aider takes OpenAI models through its --model flag and an OPENAI_API_KEY in the environment. Agent builders can use the OpenAI Agents SDK.
Batch, Flex and the cheaper tiers
Batch is asynchronous and half price across the GPT-6 line. Flex has the same rates and trades latency for the discount. Fast mode does the reverse and charges double.
Model | Standard in / out | Batch or Flex in / out | Fast in / out |
|---|---|---|---|
GPT-6 Astra | $10 / $50 | $5 / $25 | $20 / $100 |
GPT-6.1 Sol | $2 / $10 | $1 / $5 | $4 / $20 |
GPT-6.1 Terra | $1 / $5 | $0.50 / $2.50 | $2 / $10 |
GPT-6 Luna | $0.10 / $0.50 | $0.05 / $0.25 | $0.20 / $1 |
Anything a person is not waiting on belongs in Batch or Flex. That includes evaluation runs, backfills, bulk classification and nightly summaries. A job that costs $40 on Sol at standard rates costs $20 on Flex, with the only price being slower and less predictable latency.
Tool charges and older models
The price of a token is only part of an agent's bill. OpenAI charges separately for the tools its models can call.
Tool | Price |
|---|---|
Web search, all models | $10 per 1,000 calls plus search content tokens at model rates |
File search tool call | $2.50 per 1,000 calls |
File search storage | $0.10 per GB per day, first GB free |
Containers (shell, code interpreter) | $0.03 for 1 GB up to $1.92 for 64 GB, per 20-minute session |
OpenAI also keeps a long price list of older models, which matters if you run something pinned. A few examples from the pricing page: gpt-5-nano at $0.05 in and $0.40 out, gpt-5-mini at $0.25 and $2.00, o4-mini at $1.10 and $4.40, o3 at $2.00 and $8.00, and gpt-5-pro at $15 and $120. The older, cheaper rows are tempting for simple work, but a smaller current model is usually the safer long-term choice because old models are retired and you will have to migrate anyway.
Reading the data terms as a buyer
The data controls page answers four different questions, and procurement forms often merge them. We separate them here so you can answer each one.
Question on the form | Answer from OpenAI's page |
|---|---|
Do you train on our prompts? | No, unless you opt in |
Do you store our prompts? | Abuse logs for up to 30 days by default; application state on some endpoints |
Can we have zero storage? | Yes by approval, with limits listed per endpoint |
Can data stay in one region? | Yes by approval, per project, with the exclusions above |
Two of those answers have conditions you should read before signing off. First, ZDR does not make every endpoint stateless. The endpoints and capabilities marked "No" in the eligibility table may still store application state, even with ZDR on. A feature you rely on, such as a stored conversation or a file tool, can quietly put data back on disk. Second, residency and retention are linked. To use a non-US region you must also be approved for abuse monitoring controls and sign an amendment, so the paperwork is a chain, not a toggle.
For the consumer product and ChatGPT business plans, OpenAI has separate privacy pages that we did not read for this entry.
Moving to or from OpenAI
OpenAI's Chat Completions format is the closest thing to a standard, and many hosts copy it. That makes moving away easier than moving in from Claude's format. The things that still need work:
- The Responses API. Tool calling on Sol, Terra and Luna needs the Responses API, so code written for Chat Completions may need changes.
- Reasoning controls. Effort settings differ per model, and
noneis only valid on some of them. - Cache behaviour. OpenAI lists a 30-minute and a 12-hour cache write option. Other vendors price caching differently, so recheck your cost model.
- Retention paperwork. ZDR and residency are per organization or project, so a new account starts from the default 30-day log.
If you want the benefits of OpenAI's models without its terms, OpenAI also publishes open weights. gpt-oss-120b and gpt-oss-20b are Apache-2.0 on Hugging Face and run on hosts like Groq, Together AI and Fireworks AI at their own prices and under their own data rules. See gpt-oss.
Alternatives
If you need | Look at |
|---|---|
The same price tier with different data terms | |
A lower price for similar sizes | |
OpenAI's open weights on fast hardware | Groq and Together AI serve gpt-oss |
One key for many models | |
A direct comparison |
Choosing a model by job
Job | Start with | Why |
|---|---|---|
Hard coding or long agent runs | Astra, or Sol at a high effort | Astra is the stated flagship; Sol is described as near-Astra |
General product features | Sol 6.1 | The balanced option on OpenAI's own page |
Visual reasoning and computer use | Terra 6.1 | OpenAI describes it for those tasks |
Classification, extraction, routing | Luna | Cheapest and described for high-volume work |
Sol and Claude Sonnet 5.5 are identical on list price: $2 in, $10 out, and a $0.10 cache read. That is not evidence they perform alike. Run a task test on your own work before choosing between them.
A pre-launch checklist
- Check your tier in Settings and the limits for each model you plan to call.
- Cap prompt size below 272K tokens, or budget for the 2x and 1.5x surcharge.
- Start at a low reasoning effort and raise it only where quality needs it.
- If you need ZDR or Modified Abuse Monitoring, apply early, since both need approval.
- Decide on a residency region before you create the project, because the region is chosen at creation.
- Check the application-state table for every endpoint you use.
- Use Batch for anything a person is not waiting on.
Our take
OpenAI's pricing has converged with Anthropic's at the top and middle tiers, so the difference between the two lies in the terms. OpenAI offers more standardised enterprise controls: named ZDR and Modified Abuse Monitoring, per-project residency, and a hostname for each region. It also gates them behind approval and sales contact, and the 30-day abuse log is the default, not the exception. The 272K surcharge is the pricing trap, and the tier ladder is easy to climb with prepaid credit. If your use is short prompts at volume, Luna's price is hard to beat among the three big labs, but GPT-6 Luna and Claude Haiku 5.5 tie on list price, so the tiebreaker is your own task test.
We have not run tests for this page. It reflects OpenAI's published documentation on 2026-10-31. OpenAI does not pay for placement here.
Related pages
OpenAI API pricing, GPT models, LLM API prices, Codex CLI, GPT codex models.
Mentioned here
Codex vs Gemini CLI: Which to Pick
Claude Code vs Codex: Which to Pick
ChatGPT vs Claude: Plans, Models, Prices
LLM API Prices Compared: Claude, GPT, Gemini, DeepSeek
Checked 2026-10-31
How to Self-Host an LLM
Checked 2026-10-31
AI Agent Platform: How to Choose Between Builders
Checked 2026-10-31
How to Build an AI Agent, Step by Step
Checked 2026-10-31
Questions
Does OpenAI train on API data?
Its data controls page says data sent to the API is not used to train or improve OpenAI models unless you explicitly opt in. That has applied since 1 March 2023.
How long does OpenAI keep API requests?
Abuse monitoring logs, which can contain prompts and responses, are kept for up to 30 days by default. Approved customers can use Modified Abuse Monitoring or Zero Data Retention to exclude content from those logs.
How much does GPT-6 cost through the API?
Astra is $10 in and $50 out per million tokens, Sol 6.1 is $2 and $10, Terra 6.1 is $1 and $5, and Luna is $0.10 and $0.50. Prompts over 272K input tokens cost 2x on input and 1.5x on output.
Can I process data in the EU?
Data residency is a project setting for eligible customers who contact sales. Non-US regions also require approval for abuse monitoring controls and a Modified Retention amendment, and eligible newer models carry a 10 percent uplift.
Loading poll...
Reviews
Loading reviews…
Only members can review this page. Sign in
Sources
Similar
xAI API
Inference provider headquartered in US. Serves models through OpenRouter as "xAI".
- Model / inference API
Meta Llama API
Inference provider headquartered in US. Serves models through OpenRouter as "Meta".
- Model / inference API
Cohere
Inference provider headquartered in US. Serves models through OpenRouter as "Cohere".
- Model / inference API
Mistral AI API
Mistral AI's API prices Large 4 at $0.70 per million input tokens and $2.10 output with a 1M context, on our 31 October 2026 read.
- Model / inference API
DeepSeek API
The DeepSeek API bills per token.
- Model / inference API
Google AI (Gemini API)
The Gemini API prices per token.
- Model / inference API