OpenAI · Tools

GPT API

OpenAI's developer API for building on GPT models.

At a glance

Pricing model
paid
Price
Pricing on request
Hosting region
Global
Vendor
OpenAI
Report data / suggest a correction

Profile

The OpenAI API (also called the GPT API) is OpenAI's developer platform — documented at developers.openai.com and formerly at platform.openai.com — for calling GPT and reasoning models programmatically instead of through the ChatGPT interface. It's built for developers and businesses embedding AI into their own products, and it bills strictly pay-as-you-go: you pay per input and output token, at rates that vary by model rather than a flat monthly fee.

Who builds it

The OpenAI API is built and operated by OpenAI. It runs on the same underlying models as ChatGPT, but is a distinct product with its own API keys, dashboard, and billing, aimed at developers rather than end users chatting directly.

Core features

  • Pay-as-you-go token billing — every request is metered by input and output tokens and billed at the selected model's per-million-token rate, with no flat subscription fee.
  • A model lineup for every budget — OpenAI's current flagship family, GPT-5.6, ships in three tiers: Luna ($1/$6 per million input/output tokens) for cost-sensitive volume work, Terra ($2.50/$15) balancing cost and capability, and Sol ($5/$30), the frontier model for complex professional and coding tasks.
  • Dedicated reasoning models — the o-series (o3, o4-mini, o3-pro) stays available through the API for multi-step reasoning, math, and coding, even after being retired from the ChatGPT interface in February 2026.
  • Responses API — OpenAI recommends its newer Responses API over the older Chat Completions API for building new text-generation applications.
  • Automatic usage-tier scaling — rate limits (requests and tokens per minute) increase automatically as an account's cumulative spend rises, from a $100/month cap at the entry tier up to $200,000/month at the top tier.
  • API-key based access — requests are authenticated with project or organization API keys, with separate admin keys and workload identity tokens for enterprise setups, entirely independent of a ChatGPT login.

Pricing

The OpenAI API is billed per model, per token — there is no single flat price. As of OpenAI's current pricing page, GPT-5.6 Luna costs $1 per million input tokens and $6 per million output tokens, GPT-5.6 Terra costs $2.50/$15, and GPT-5.6 Sol costs $5/$30. The o3 reasoning model is priced separately at $2 per million input tokens ($0.50 for cached input) and $8 per million output tokens. New accounts are capped at roughly $100 of monthly usage until their spend qualifies them for a higher tier; there is no ongoing free quota for production use.

Who it's for

The OpenAI API is for developers and companies building their own applications, chatbots, agents, or automated workflows on top of GPT models — not for people who simply want to chat, who should use ChatGPT instead. It suits teams that need programmatic control over model choice, prompts, and cost, and that are comfortable managing API keys, rate limits, and usage-based billing themselves. Because pricing and capability are split across many model tiers, it also suits teams that want to fine-tune the cost-versus-quality tradeoff per feature — for example, routing simple classification calls to a cheaper model like GPT-5.6 Luna while reserving GPT-5.6 Sol or an o-series reasoning model for harder, higher-value requests.

Frequently asked questions

What is the OpenAI API (GPT API)?

The OpenAI API is OpenAI's developer platform for calling GPT and reasoning models programmatically — you send a prompt via an SDK or HTTP request and get generated output back, billed per token rather than through a ChatGPT-style subscription. OpenAI recommends its Responses API over the older Chat Completions API for new text-generation applications.

How much does the OpenAI API cost?

Pricing is per model and per token. As of OpenAI's current pricing page, the GPT-5.6 family costs $1/$6 per million input/output tokens (Luna), $2.50/$15 (Terra), and $5/$30 (Sol, the frontier model); the o3 reasoning model costs $2 per million input tokens ($0.50 cached) and $8 per million output tokens.

Is the OpenAI API free?

Not for ongoing use. It is pay-as-you-go, billed to the payment method on file once any trial credit is used. New accounts are capped at roughly $100 in monthly usage until they qualify for a higher tier, but there is no free ongoing quota for production use.

Which GPT models can I use via the API?

OpenAI's current flagship line is the GPT-5.6 family (Sol, Terra, Luna), each trading off cost against capability, alongside dedicated reasoning models from the o-series (o3, o4-mini, o3-pro) and specialized models like GPT Image 2 for images. Older models such as GPT-4o remain callable in the API for now but are on OpenAI's published deprecation schedule (for example, the gpt-4o-2024-05-13 snapshot is scheduled to shut down October 23, 2026).

How do I access the OpenAI API (get an API key)?

You create an account and generate a secret API key from the developer dashboard, then authenticate requests with that key; organizations can also issue separate admin API keys or use workload identity tokens. This is entirely separate from logging into the consumer ChatGPT app.

How is the OpenAI API different from ChatGPT?

ChatGPT is OpenAI's consumer chat product with flat-rate subscription tiers, while the OpenAI API is a separate developer platform with its own API keys and per-token, pay-as-you-go billing, used to build custom applications rather than to chat directly. The two products share underlying models but have independent access, billing, and rate-limit systems.