How do API prices compare between OpenAI, Anthropic, and Google?
General Price Tiers
All three providers structure pricing around model capability. Budget models like GPT-4o mini, Claude Haiku, and Gemini Flash cost a fraction of a cent per thousand tokens, while flagship models like GPT-4o, Claude Sonnet, and Gemini Pro cost several cents per thousand tokens.
Input and output tokens are priced separately, with output typically costing 2–4 times more. For example, a mid-tier model might charge $3 per million input tokens and $15 per million output tokens, though exact rates change frequently.
- Budget: GPT-4o mini, Claude Haiku, Gemini Flash — often under $1 per million tokens
- Mid-range: GPT-4o, Claude Sonnet, Gemini Pro — roughly $3–$15 per million tokens
- Premium: o1, Claude Opus — can exceed $15–$75 per million tokens
- Batch APIs often cut costs by 50% for non-urgent jobs
Which Provider Is Cheapest?
For simple, high-volume tasks, Google's Gemini Flash and OpenAI's GPT-4o mini are usually the most affordable. Anthropic's Haiku models are competitive but sometimes slightly pricier per token.
For complex reasoning, Anthropic's Claude Sonnet and OpenAI's GPT-4o are similarly priced, while Google's Gemini Pro often undercuts them. However, price alone doesn't determine value—output quality and token efficiency matter.
Common mistakes
- Assuming the cheapest per-token model is always the most cost-effective; a cheaper model may need more tokens or retries to get the job done.
- Ignoring output token costs, which are often much higher than input costs and can dominate your bill.
- Forgetting that prices change frequently, so always check the provider's current pricing page.
