AI API pricing: OpenAI, Anthropic, Google Gemini and xAI per 1M tokens
Prices checked · Updated
API list prices per 1M tokens, checked Nov 4, 2026.
- Cheapest input
- GPT-6 Luna, $0.10
- Cheapest output
- GPT-6 Luna, $0.50
- Models listed
- 27
Input vs output price
Every API model on log scales, USD per 1M tokens; bottom left is cheapest.
ChatGPTClaudeGeminiGrok
API prices per 1M tokens
| Model | Input | Output | Cached input | Cache write |
|---|---|---|---|---|
| OpenAI API: GPT-6 Astra | $10 | $50 | $1 | $12.50 |
| OpenAI API: GPT-6.1 Sol | $2 | $10 | $0.10 | $2.50 |
| OpenAI API: GPT-6.1 Terra | $1 | $5 | $0.05 | $1.25 |
| OpenAI API: GPT-6 Sol | $2 | $10 | $0.20 | $2.50 |
| OpenAI API: GPT-6 Luna | $0.10 | $0.50 | $0.01 | $0.125 |
| OpenAI API: GPT-5.6 Sol (promo) | $4 | $20 | $0.40 | $5 |
| OpenAI API: GPT-5.6 Terra | $2 | $12 | $0.20 | $2.50 |
| OpenAI API: GPT-5.6 Luna | $0.20 | $1.20 | $0.02 | $0.25 |
| Anthropic API (Claude): Fable 5.1 | $10 | $50 | $0.25 | $12.50 |
| Anthropic API (Claude): Opus 5.5 | $4 | $20 | $0.20 | $5 |
| Anthropic API (Claude): Sonnet 5.5 | $2 | $10 | $0.10 | $2.50 |
| Anthropic API (Claude): Haiku 5.5 (<=100K prompt) | $0.10 | $0.50 | $0.01 | $0.125 |
| Anthropic API (Claude): Haiku 5.5 (>100K prompt) | $0.50 | $2.50 | $0.05 | $0.625 |
| Gemini API (Google): Gemini 4 Argon (promo) | $2 | $10 | $0.10 | – |
| Gemini API (Google): Gemini 3.1 Pro Preview (<=200K prompt) | $2 | $12 | $0.20 | – |
| Gemini API (Google): Gemini 3.1 Pro Preview (>200K prompt) | $4 | $18 | $0.40 | – |
| Gemini API (Google): Gemini 3.8 Flash (promo) | $0.75 | $3.75 | $0.075 | – |
| Gemini API (Google): Gemini 3.6 Flash (promo) | $0.75 | $3.75 | $0.075 | – |
| Gemini API (Google): Gemini 3.5 Flash-Lite | $0.30 | $2.50 | $0.03 | – |
| Gemini API (Google): Gemini 3.1 Flash-Lite | $0.25 | $1.50 | $0.025 | – |
| xAI API (Grok): Grok 4.7 (<200K prompt) | $2 | $6 | $0.50 | – |
| xAI API (Grok): Grok 4.7 (>=200K prompt) | $4 | $12 | $1 | – |
| xAI API (Grok): Grok 4.6 (<200K prompt) | $2 | $6 | $0.50 | – |
| xAI API (Grok): Grok 4.5 (<200K prompt) | $2 | $6 | $0.30 | – |
| xAI API (Grok): Grok 4.3 (<200K prompt) | $1.25 | $2.50 | $0.20 | – |
| xAI API (Grok): Grok 4.20 (<200K prompt) | $1.25 | $2.50 | $0.20 | – |
| xAI API (Grok): Grok Build 0.1 (<200K prompt) | $1 | $2 | $0.20 | – |
API credits included with plans
- Claude: Monthly API credits. Max includes $100/month and Ultra $200/month in Claude API credits. Team plans pool credits up to $500/month. These credits pay for API use; they do not add chat allowance to the subscription.
- ChatGPT: API credits on Pro. Pro plans include monthly API credits for building apps and agents (amount not shown on the pricing page). Eligibility applies, first grant is prorated, unused credits expire at the end of the billing cycle.
- Gemini: Free API tier (Google AI Studio). Google AI Studio and the Gemini Developer API have a no-cost tier with limited models and rate limits; free-tier content is used to improve Google's products. The paid tier is billed per token and is separate from Google AI plans.
Pricing notes
OpenAI API
- Standard speed.
- Short context is up to 272K input tokens; long context rates above that are higher (Astra long: $20 in / $75 out).
- Batch and Flex are about 50% of Standard; Fast is 2x; Ultrafast (Astra, 6.1 Sol only) is 6x.
- GPT-5.6 Sol promotional pricing runs at least through Nov 21, 2026.
- Regional processing adds 10%.
Source: OpenAI API pricing.
Anthropic API (Claude)
- Standard speed, prompt-caching shown at 5-minute TTL.
- US-only inference is 1.1x.
- Haiku 5.5 is listed twice because its rates differ for prompts up to 100K tokens versus over 100K.
- The page prints the four rates in the order cache read, cache write, input, output, and that order is how they are mapped here.
- Batch processing is available at a discount (rate not printed on the pricing page).
- Cache-read rates are shown as printed on the page.
Source: Claude pricing page.
Gemini API (Google)
- Gemini Developer API, Standard paid tier, per 1M tokens.
- Several prices are promotional: Gemini 4 Argon is $2 in / $10 out through November 30, 2026 ($4 / $20 from December 1, 2026); Gemini 3.8 Flash and 3.6 Flash are $0.75 / $3.75 through December 31, 2026 ($1.50 / $7.50 from January 1, 2027).
- Batch and Flex are 50% of Standard; Priority is 1.8x.
- Text input price shown (audio input costs more on some models).
- Context-cache storage is billed per hour on top.
Source: Gemini Developer API pricing (Google AI for Developers).
xAI API (Grok)
- Requests whose prompt reaches 200K tokens are billed at the higher rate for all tokens in the request.
- Cached input shown below is for the short-context tier.
Source: xAI API models and pricing.
OpenAI API: tools and modes
| Item | Price |
|---|---|
| Fast mode | 2x Standard rates |
| Ultrafast (GPT-6 Astra, GPT-6.1 Sol) | 6x Standard rates. Astra: $60 in / $300 out. 6.1 Sol: $12 in / $60 out. |
| Batch / Flex | About 50% of Standard |
| Data residency endpoints | 10% uplift for models released on or after Mar 5, 2026 |
OpenAI API: other listed rates
| Model | Input | Output |
|---|---|---|
| gpt-5.5 | $5 | $30 |
| gpt-5.5-pro | $30 | $180 |
| gpt-5.4 | $2.50 | $15 |
| gpt-5.4-pro | $30 | $180 |
| gpt-5.4-mini | $0.75 | $4.50 |
| gpt-5.4-nano | $0.20 | $1.25 |
| gpt-5.2 | $1.75 | $14 |
| gpt-5.1 | $1.25 | $10 |
| gpt-5 | $1.25 | $10 |
| gpt-5-mini | $0.25 | $2 |
| gpt-5-nano | $0.05 | $0.40 |
| gpt-4.1 | $2 | $8 |
| gpt-4o | $2.50 | $10 |
| o3 | $2 | $8 |
Anthropic API (Claude): tools and modes
| Item | Price |
|---|---|
| Web search | $10 per 1K searches (plus tokens) |
| Code execution | 50 free hours/day per organization, then $0.05 per container-hour |
| Managed Agents | $0.08 per session-hour of active runtime, plus standard token rates |
| Service tiers | Standard and Batch |
Anthropic API (Claude): other listed rates
| Model | Input | Output |
|---|---|---|
| Fable 5 | $10 | $50 |
| Opus 5 | $5 | $25 |
| Sonnet 5 | $2 | $10 |
| Haiku 4.5 | $1 | $5 |
| Opus 4.8 | $5 | $25 |
| Opus 4.7 | $5 | $25 |
| Opus 4.6 | $5 | $25 |
| Opus 4.5 | $5 | $25 |
| Sonnet 4.6 | $3 | $15 |
| Sonnet 4.5 | $3 | $15 |
Gemini API (Google): tools and modes
| Item | Price |
|---|---|
| Grounding with Google Search (Gemini 3 and newer) | 5,000 free requests per month, then $14 per 1,000 requests |
| Batch / Flex | 50% of Standard |
| Priority | 1.8x Standard |
| Nano Banana 2.1 images | About $0.0336 per 1K image ($30 per 1M image output tokens) |
| Gemini Omni Flash video | About $0.10 per second of video |
| Embeddings (Gemini Embedding) | $0.15 per 1M tokens |
Gemini API (Google): other listed rates
| Model | Input | Output |
|---|---|---|
| gemini-3-flash-preview | $0.50 | $3 |
| gemini-2.5-pro (<=200K) | $1.25 | $10 |
| gemini-2.5-pro (>200K) | $2.50 | $15 |
| gemini-2.5-flash | $0.30 | $2.50 |
| gemini-2.5-flash-lite | $0.10 | $0.40 |
xAI API (Grok): tools and modes
| Item | Price |
|---|---|
| Grok Imagine image | $0.02 per image (grok-imagine-image), $0.04 (image-2.0) |
| Grok Imagine video | $0.050 per sec (video), $0.080 (video-1.5), $0.020 (video-1.5-lite) |
| Voice (speech to speech, grok-voice-3.0) | $0.08 per minute ($4.80 per hour) |
| Speech to text | $0.10 per hour (REST), $0.20 per hour (streaming) |
| Text to speech | $15 per 1M characters |
xAI API (Grok): other listed rates
| Model | Input | Output |
|---|---|---|
| grok-4.6 (>=200K) | $4 | $12 |
| grok-4.5 (>=200K) | $4 | $12 |
| grok-4.3 (>=200K) | $2.50 | $5 |
| grok-4.20 (>=200K) | $2.50 | $5 |
| grok-build-0.1 (>=200K) | $2 | $4 |
Download these rates as JSON or CSV (CC BY 4.0). The API cost calculator estimates a monthly bill and the break-even point against a subscription.
Sources
OpenAI API pricing · Claude pricing page · Gemini Developer API pricing (Google AI for Developers) · xAI API models and pricing · ChatGPT pricing page