GPT-4o vs. GPT-5: API Cost Comparison
On this API, GPT-4o costs $0.875 / $3.5 per 1M tokens (in/out) and GPT-5 costs $0.4375 / $3.5. GPT-5 is the cheaper option, and both run on the same key — switching is a one-line model parameter change.
Per-token pricing
| GPT-4o | GPT-5 | |
|---|---|---|
| Vendor | OpenAI | OpenAI |
| Input · per 1M tokens · Official list | $2.5 | $1.25 |
| Input · per 1M tokens · Your price | $0.875 | $0.4375 |
| Output · per 1M tokens · Official list | $10 | $10 |
| Output · per 1M tokens · Your price | $3.5 | $3.5 |
| Discount vs. list | -65% | -65% |
| Context window | 128K tokens | 400K tokens |
| Max output tokens | 16K tokens | 128K tokens |
All prices in USD per 1M tokens.
What a real workload costs
Same request stream priced on both models — 10M input + 2M output tokens per month, a typical coding-agent load:
Switching between them
Both models answer on the same endpoint. Keep your base URL and key; change only the model parameter to reroute a request:
curl https://kktt.net/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-d '{"model": "gpt-4o", "messages": [...]}'curl https://kktt.net/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-d '{"model": "gpt-5", "messages": [...]}'FAQ
Which is cheaper, GPT-4o or GPT-5?
On this API, GPT-5 is cheaper: $0.4375 in / $3.5 out per 1M tokens, versus $0.875 in / $3.5 out for GPT-4o.
Can I use GPT-4o and GPT-5 with the same API key?
Yes. Both are callable with one key on the same base URL — switching between them is a one-line change of the model parameter, which makes A/B testing or fallback routing trivial.
Do GPT-4o and GPT-5 differ in context window?
GPT-4o supports 128K of context with 16K max output; GPT-5 supports 400K with 128K max output.