GPT vs Claude pricing
AI API Pricing Comparison
Compare OpenAI and Anthropic token prices for high-intent API cost searches. Use the calculator to model a typical request, then scan the table for cheaper input, cached input, and output options.
OpenAI pricing rule
GPT-5.4 Mini Token Cost Calculator
Estimated API cost
$0.06- Input
- $0.0375
- Cached input
- $0.00
- Output
- $0.0225
- Per 1,000 requests
- $60.00
Cost Per Million Tokens
| Model | Input | Cached input | Output | Context |
|---|---|---|---|---|
| GPT-5.5 | $5 | $0.5 | $30 | Provider dependent |
| GPT-5.4 | $2.5 | $0.25 | $15 | Provider dependent |
| GPT-5.4 Mini | $0.75 | $0.075 | $4.5 | Provider dependent |
| Claude Sonnet 4 | $3 | $0.3 | $15 | 200,000 tokens |
| Claude Opus 4 | $15 | $1.5 | $75 | 200,000 tokens |
| Claude Haiku 3.5 | $0.8 | $0.08 | $4 | 200,000 tokens |
GPT vs Claude Pricing Snapshot
How To Find The Cheapest AI API
The cheapest model depends on token mix. Retrieval-heavy apps often care most about input and cached-input pricing, while agentic coding and content workflows can be dominated by output tokens. Compare both sides before choosing a provider.
GPT vs Claude Cost Patterns
For input-heavy RAG workflows, low input and cached-input pricing can matter more than output pricing. For writing, coding, and report generation, output token pricing often becomes the main cost driver.
For agents, compare total task cost instead of one model call. A lower per-token model is not always cheaper if it needs more retries or more tool loops to finish the job.
Compare These Before Choosing
- Average input tokens per request
- Average output tokens per request
- Expected requests per day or month
- Cache hit rate for repeated context
- Number of model calls per user task
Pricing sources: OpenAI and Anthropic. Estimates are intended for planning and keyword research, not invoice reconciliation.
FAQ
Is GPT or Claude cheaper?
It depends on the selected model and the input-to-output ratio. Smaller GPT-family models can be cheaper for high-volume input, while Claude pricing varies between Sonnet, Opus, and Haiku tiers.
Why compare per million tokens?
Providers publish token pricing per million tokens, which makes it the cleanest unit for comparing models even when actual requests are much smaller.
What costs are not included?
This comparison excludes taxes, committed-use discounts, priority processing, regional uplifts, tool calls, web search, file search, and long-context premiums unless those are added as explicit JSON rules.
Which model is best for RAG cost?
RAG cost depends heavily on input tokens and cache hits because retrieved context can be much longer than the user question. Compare input and cached-input pricing first.
Which model is best for agent cost?
Agent cost depends on the number of model calls per task. A cheaper model can win if it completes tasks in fewer retries, while a premium model can be cheaper when it avoids failed loops.