OpenAI · API platform

OpenAI API

Pay-per-token developer access to OpenAI's GPT models for building apps, agents and automations.

Provider
OpenAI
Latest confirmed model
GPT-6 Astra (gpt-6-astra)
Pricing
Paid only
Free plan
No
API
Yes
Status
Generally available
Last verified
Oct 19, 2026

What is OpenAI API?

The OpenAI API lets developers send text, images and other inputs to OpenAI's GPT models from their own code and receive generated responses. You create an API key, call the models over HTTPS or with an official SDK, and pay only for the tokens you use. The current lineup is split into a most-capable model (GPT-6 Astra), a mid-tier model (GPT-6.1 Sol) and a low-cost high-volume model (GPT-6 Luna).

Adding language understanding, generation and reasoning to a product without training or hosting a model yourself.

Why use OpenAI API?

Practical benefits

  • Several price/performance tiers from the same provider
  • Large 1.05M-token context window on current GPT-6 models
  • Batch and Flex processing at roughly half the standard rate
  • Cached input billed at a fraction of normal input price

Who it suits

  • Software developers
  • Startups building AI features
  • Teams automating document or support workflows

When another tool may fit better

  • People who want a ready-made chat app with no coding (use ChatGPT)
  • Workloads that must run fully offline or on your own hardware
  • Users who need a guaranteed free API allowance
Learning curve
Some experience helps
Skills needed
Basic programming and HTTP/JSON; understanding of tokens and prompt design helps.

Example workflows

  1. Generate an API key, install the SDK, call gpt-6-luna to classify support tickets
  2. Send large overnight jobs through the Batch API to cut cost

What can it do?

  • Tiered GPT-6 model familyAstra (most capable), Sol (near-Astra at lower cost) and Luna (efficient, high-volume).
  • Batch processingAsynchronous jobs billed at roughly 50% of standard rates.
  • Flex processingLower-priority processing priced at batch rates for supported models.
  • Fast modeHigher-priority processing (formerly Priority) at roughly 2x standard price for many models.
  • Prompt cachingRepeated input billed at a discounted cached-input rate.
  • Moderation modelomni-moderation-latest is listed as free to use.

Good for

  • Chatbots and assistants inside products
  • Document summarisation and extraction
  • Coding and agent workflows
  • Content classification and moderation

Where it runs

Pricing and plans

Paid only Usage-based billing per 1M tokens, with separate rates for input, cached input and output. GPT-6 Astra costs $10 input / $50 output, GPT-6.1 Sol $2 / $10 and GPT-6 Luna $0.10 / $0.50 per 1M tokens on the Standard tier. Batch and Flex are about half price; Fast mode costs more.

PlanPriceBillingFree trial / tierUsage limitsMain inclusionsModel accessAPI accessRestrictions
Standard (pay as you go)Billed per 1M tokens by model; prices shown are for inputs up to 272K context.usage-based —Rate limits depend on account usage tier.
  • All GPT models
  • Prompt caching discounts
Full model lineup including gpt-6-astra, gpt-6.1-sol, gpt-6-luna and older GPT-5.x/4.x modelsYesPrepaid or billed usage required
BatchRoughly 50% of Standard rates (e.g. gpt-6-astra input $5 per 1M).usage-based —Asynchronous; results are not immediate.
  • Bulk asynchronous jobs
Listed modelsYesNot suitable for real-time responses
FlexSame rates as Batch for models in the Flex table.usage-based —Lower-priority processing.
  • Lower cost synchronous-style requests
GPT-5.x and some older models per the pricing tableYesNot all models supported
Fast modeRoughly 2x Standard for many models (e.g. gpt-6-astra input $20 per 1M).usage-based ——
  • Priority processing
Listed modelsYes—

Prices in USD · Global list price · Taxes may apply · Verified Oct 19, 2026

Worked example (usage-based API pricing): sending 1,000,000 input tokens and receiving 200,000 output tokens at the listed gpt-6-astra rates ($10 and $50 per 1M) costs about $20 before tax. Real bills depend on the model, caching, batch discounts and any tier you qualify for.

Official pricing page (opens in a new tab)

API and developer access

Official API
Yes
Authentication
API key (Bearer)
Pricing model
per 1M tokens
Free API quota
None documented — the free plan above (if any) is for the app, not the API
Rate limits
Tier-based; varies by account
Context / input limits
1.05M tokens (gpt-6-astra, gpt-6.1-sol, gpt-6-luna); 128K max output
SDKs
Not documented
Streaming
Not documented
Batch processing
Yes
Structured output
Not documented
Tool / function calling
Not documented
Commercial use
See the provider terms
Data retention & privacy
See the provider privacy terms

Published API rates

ItemPriceUnit
gpt-6-astra input$10per 1M input tokens
gpt-6-astra cached input$1per 1M input tokens
gpt-6-astra output$50per 1M output tokens
gpt-6.1-sol input$2per 1M input tokens
gpt-6.1-sol output$10per 1M output tokens
gpt-6-luna input$0.10per 1M input tokens
gpt-6-luna cached input$0.01per 1M input tokens
gpt-6-luna output$0.50per 1M output tokens

A free OpenAI API account is not the same thing as free API access. Unless a free API quota is listed above, API calls are billed separately.

Verified Oct 19, 2026

Advantages and disadvantages

Advantages

  • Clear model tiers with published per-token prices
  • Very large context window on current models
  • Multiple cost-saving modes (Batch, Flex, caching)

Disadvantages

  • No documented free API tier for the GPT models
  • Costs can grow quickly at the top tier ($50 per 1M output tokens for Astra)
  • Higher pricing applies above 272K input tokens per the pricing page tables

Privacy: Check OpenAI's API data-usage and retention policies for your account; not verified in this research.

Real-world examples

A support team auto-tagging incoming tickets

  1. Create an API key in the OpenAI platform
  2. Send each ticket text to gpt-6-luna with a list of allowed tags
  3. Store the returned tag in the help-desk system

needs API key

A developer summarising thousands of reports overnight

  1. Prepare a JSONL file of requests
  2. Submit it through the Batch API
  3. Download results when the batch completes, paying about half the standard rate

needs API key

A startup building a research assistant

  1. Use gpt-6.1-sol for most queries
  2. Route the hardest questions to gpt-6-astra
  3. Cache the long shared system prompt to reduce input cost

needs API key

OpenAI API alternatives

Compare OpenAI API with these side by side

Frequently asked questions

Is the OpenAI API free?

No free API tier for the GPT models is described on the official pricing page. You pay per token; only the omni-moderation-latest model is listed as free.

Which OpenAI model is the most capable?

OpenAI's models page describes GPT-6 Astra (gpt-6-astra) as its most capable model, priced at $10 per 1M input and $50 per 1M output tokens.

What is the cheapest current model?

GPT-6 Luna (gpt-6-luna) is described as the most efficient model, at $0.10 per 1M input and $0.50 per 1M output tokens. Older gpt-5-nano is also listed at $0.05 / $0.40.

How can I cut costs?

Use the Batch API or Flex processing (about half the standard rate), reuse prompts to benefit from cached-input pricing, and choose a smaller model for simple tasks.

How large is the context window?

The current GPT-6 Astra, GPT-6.1 Sol and GPT-6 Luna models list a 1.05M-token context window and 128K max output.

Is the API the same as ChatGPT?

No. ChatGPT is a consumer app with its own subscriptions; the API is billed separately per token and is meant for developers.