OpenAI API: models, pricing, keys and your first call
Updated 2026-11-26
Model pages: GPT-6.2 Sol API · GPT-6.2 Astra API — pricing, specs and the playground
"OpenAI API", "ChatGPT API" and "GPT API" are three names people use for the same thing: programmatic access to OpenAI's models. ChatGPT is the app; the API is what developers call from code, and it is billed separately. A ChatGPT Plus or Pro subscription does not include API usage, and API credit does not unlock ChatGPT features.
This page is the overview. Each topic has its own page with the detail: prices and cost examples, error codes, rate limits, what OpenAI-compatible means, and alternatives. Model names, prices and limits here were checked against OpenAI's documentation and our own service on 26 November 2026.
Current GPT models and what they cost
Input / output price per million tokens, standard processing, requests up to 272K input tokens. Astra is the largest tier, Sol the general-purpose one, Terra a lower-cost tier and Luna the smallest.
| Model | OpenAI standard rate | On APIMODELS | Typical use |
|---|---|---|---|
| GPT-6.2 Astra | $8.00 / $40.00 | $4.00 / $20.00 | Hardest reasoning and long agent runs |
| GPT-6.2 Sol | $2.00 / $10.00 | $1.00 / $5.00 | General coding and chat; the default choice |
| GPT-6.1 Sol | $2.00 / $10.00 | $1.00 / $5.00 | Same tier, previous point release |
| GPT-6.1 Terra | $1.00 / $5.00 | $0.50 / $2.50 | High-volume work where Sol is more than needed |
| GPT-6 Astra | $10.00 / $50.00 | $3.40 / $17.00 | First GPT-6 flagship |
| GPT-6 Sol | $2.00 / $10.00 | $1.00 / $5.00 | First GPT-6 general model |
| GPT-6 Luna | $0.10 / $0.50 | $0.09 / $0.45 | Classification, extraction, routing |
| GPT-5.6 Sol / Terra / Luna | $4 / $20, $2 / $12, $0.20 / $1.20 | $1.324 / $6.618, $0.551 / $3.309, $0.18 / $0.96 | Previous generation, still served |
How the API works
1. One request, one response. You POST JSON to an endpoint. The two main ones are /v1/chat/completions, the format most tools speak, and /v1/responses, OpenAI's newer interface with built-in tools such as web search. Embeddings, images and audio have their own endpoints.
2. You pay per token. Input and output are priced separately, and output costs five times as much as input on GPT-6 models. Reasoning tokens count as output. A request above 272K input tokens is billed at a higher rate for the whole request.
3. Limits depend on your tier. OpenAI assigns rate limits and a monthly usage ceiling by usage tier (Free, Build, Launch, Grow), which rises with your total credit purchases. Exceeding a limit returns a 429.
4. Models are retired on a schedule. In 2026 OpenAI shut down gpt-4, gpt-3.5-turbo, the Assistants API and others. Pin a model name, watch the deprecations page, and keep the model name in configuration rather than in code.
API keys: OpenAI's and ours are different things
| OpenAI key | APIMODELS key | |
|---|---|---|
| Where you create it | The API keys page of the OpenAI platform dashboard, inside an organization and project | The API keys page of the APIMODELS console, after signing in with Google or Alipay |
| Where it works | api.openai.com only | api.apimodels.app only |
| What it is billed against | Prepaid credits in your OpenAI organization | Your APIMODELS balance, shared by every model |
| What it can call | OpenAI models | GPT models plus Claude, Gemini and image, video and audio models |
| Limits attached | Your organization's usage tier, rate limits and spend limits | 20 POST requests per second per key; no usage tiers |
| If it leaks | Delete it in the dashboard and create a new one | Delete it in the console and create a new one; keys are shown once and stored hashed |
Your first call through APIMODELS
1. Sign in and create a key. The console shows the key once, together with a request you can paste into a terminal.
2. Use the OpenAI SDK with our base URL. Set base_url to https://api.apimodels.app/v1 and pass the APIMODELS key. Nothing else in OpenAI-style code changes.
3. Keep max_tokens realistic. We reserve the worst-case cost before a request runs, so a short test with max_tokens of a few hundred fits inside the $0.30 trial credit on Sol-tier models, while a very large max_tokens can be rejected with a 402.
4. Read usage.cost. Every response reports what was charged, so you can check the price against the table above from the first request.
OpenAI directly, or a gateway?
Buy from OpenAI directly when you need the parts only OpenAI has: Batch and Background processing, fine-tuning, the newest endpoints on release day, data-residency endpoints, or a contract and support from the model vendor. Use Azure OpenAI when you need those with regional deployment and enterprise identity.
A gateway fits when you want GPT models without an OpenAI organization, a lower per-token price, more than one model vendor behind the same code, or payment methods OpenAI does not take. On APIMODELS that means GPT-6.x at half of OpenAI's standard rate, automatic failover between upstream routes on most GPT models, and payment by card, PayPal, Alipay or USDT. It does not mean an availability guarantee: we do not publish an uptime figure, and a request can still fail when every route fails. Failed requests are not charged.
Quick start
cURL
curl https://api.apimodels.app/v1/chat/completions \
-H "Authorization: Bearer $APIMODELS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.2-sol",
"max_tokens": 256,
"messages": [
{"role": "system", "content": "You answer in one short paragraph."},
{"role": "user", "content": "What is an API key?"}
]
}'Python
import openai
# The OpenAI SDK, pointed at APIMODELS.
client = openai.OpenAI(
base_url="https://api.apimodels.app/v1",
api_key="sk_...your_apimodels_key...",
)
stream = client.chat.completions.create(
model="gpt-6.2-sol",
max_tokens=256,
stream=True,
messages=[
{"role": "system", "content": "You answer in one short paragraph."},
{"role": "user", "content": "What is an API key?"},
],
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
print()FAQ
What is the OpenAI API?
It is the HTTP interface that lets a program use OpenAI's models. You send a model name and a list of messages, authenticate with an API key, and receive the model's answer plus a usage count. You pay per token rather than a monthly fee, and it is a separate product from ChatGPT.
Is the ChatGPT API the same as the OpenAI API?
Yes in practice: "ChatGPT API" is the common name for calling OpenAI's GPT models through the OpenAI API. There is no separate API that gives you the ChatGPT app's memory, projects or custom GPTs; you get the models and build those features yourself.
Does a ChatGPT Plus subscription include API access?
No. ChatGPT subscriptions and the API are billed separately. A Plus or Pro plan does not give you API credit, and API credit does not upgrade your ChatGPT account. To use the API you add prepaid credits on the OpenAI platform, or use a gateway with its own balance.
How do I get an OpenAI API key?
Sign in to the OpenAI platform, open the API keys page and create a secret key inside a project; copy it when it is shown, because it is displayed once. You also need prepaid credits before requests succeed. An OpenAI key works only on OpenAI's endpoint. To call GPT models through APIMODELS you create a separate key in our console, and that key does not work on OpenAI.
Which GPT model should I use?
Start with GPT-6.2 Sol for general coding and chat. Move down to GPT-6.1 Terra or GPT-6 Luna for high-volume tasks such as classification and extraction, where they cost a half to a twentieth as much. Move up to GPT-6.2 Astra only for work Sol gets wrong, because it costs four times as much. Test on your own prompts: tier names tell you the size, not whether a model is good enough for your task.
Related
- OpenAI API pricing: every GPT model, with cost examples
- OpenAI API error codes: every status explained
- OpenAI API "Rate limit reached" (429): six causes
- OpenAI-compatible API: what works and what does not
- OpenAI API alternatives: seven options compared
- GPT-6 API pricing in detail
- GPT Image API pricing per image
- Claude API: models, pricing and first call
