OpenAI GPT-5 API
OpenAI's latest flagship model family — GPT-5 and all Codex variants
Overview
OpenAI GPT-5 is the newest flagship model from OpenAI. AI Generate provides access to GPT-5, GPT-5.2, GPT-5.3, GPT-5.4 and all Codex variants through one API with pay-as-you-go billing.
All 17 OpenAI GPT-5 variants & pricing
Every variant is accessible via the same API endpoint. Switch variants by changing the model parameter. No extra setup.
| Variant | Credits | Price USD | Unit | |
|---|---|---|---|---|
| gpt-5.5, Chat, Cached Input | 28.00 | $0.1960 | per million tokens | Details → |
| gpt-5-2, Chat, Input | 88.00 | $0.6160 | per million tokens | Details → |
| gpt-5-codex, Chat, Input | 100.00 | $0.7000 | per million tokens | Details → |
| gpt-5.1-codex, Chat, Input | 100.00 | $0.7000 | per million tokens | Details → |
| gpt-5.2-codex, Chat, Input | 140.00 | $0.9800 | per million tokens | Details → |
| gpt-5.4, Chat, Input | 140.00 | $0.9800 | per million tokens | Details → |
| gpt-5.3-codex, Chat, Input | 140.00 | $0.9800 | per million tokens | Details → |
| gpt-5.4-codex, Chat, Input | 140.00 | $0.9800 | per million tokens | Details → |
| gpt-5.5, Chat, Input | 280.00 | $1.9600 | per million tokens | Details → |
| gpt-5-2, Chat, Output | 700.00 | $4.9000 | per million tokens | Details → |
| gpt-5-codex, Chat, Output | 800.00 | $5.6000 | per million tokens | Details → |
| gpt-5.1-codex, Chat, Output | 800.00 | $5.6000 | per million tokens | Details → |
| gpt-5.4, Chat, Output | 1120.00 | $7.8400 | per million tokens | Details → |
| gpt-5.4-codex, Chat, Output | 1120.00 | $7.8400 | per million tokens | Details → |
| gpt-5.3-codex, Chat, Output | 1120.00 | $7.8400 | per million tokens | Details → |
| gpt-5.2-codex, Chat, Output | 1120.00 | $7.8400 | per million tokens | Details → |
| gpt-5.5, Chat, Output | 1680.00 | $11.7600 | per million tokens | Details → |
Use OpenAI GPT-5 via API
Example call with the default variant. Replace model with any slug from the table above.
curl https://aimarcusimage.eu/api/v1/chat/completions \
-H "Authorization: Bearer sk-aig-..." \
-H "Content-Type: application/json" \
-d '{
"model": "openai-gpt-5-5-chat-cached-input",
"messages": [
{
"role": "user",
"content": "Hello from AI Generate"
}
]
}'
FAQ
How much does OpenAI GPT-5 cost?
Pricing starts at $0.1960 per million tokens for the most affordable variant. You pay per call from your credit balance — no monthly subscription, no minimum commitment. Starter top-up is $10 → 1,430 credits.
Is this an official OpenAI API?
AI Generate is an AI model aggregator that routes calls to OpenAI's upstream API. You get the exact same model outputs with simpler billing (pay per call, no contracts), one API key for 307 models, and the same OpenAI-compatible request shape across all providers.
Can I use OpenAI GPT-5 in production?
Yes. The endpoint is rate-limited to 20 requests per 10 seconds per API key, retries are idempotent via taskId, and async results are delivered via polling or webhook. Set a spend cap in dashboard settings to protect against runaway usage.
Which OpenAI GPT-5 variant should I pick?
For first tests, start with the cheapest variant (lowest "Price USD" in the table above). Upgrade to higher-resolution or "Quality" tiers only when you have validated prompts. The Playground lets you A/B test all variants with the same per-call pricing as the API.