OpenAI vs Google Gemini API
A comparison of OpenAI and Google Gemini API built from values read directly from each provider's own documentation, with the source recorded against every figure.
The short answer
- Pick OpenAI if
- Work that fits inside the short-context rate, where the cheapest tier is $0.20 per million input tokens and the batch tier halves everything above it.
- Pick Google Gemini API if
- Getting to a working prototype without a card, then staying on the cheapest frontier-adjacent rates in this set — $0.75 per million input tokens is well under half what Anthropic and OpenAI charge for their top models.
7 sourced criteria separate them:
- Pricing model
- OpenAI: Per million tokens, with a second rate above the short-context threshold — long-context input and output cost roughly double. Batch, Flex, Fast and standard tiers are priced separately, and regional processing adds a 10% uplift on models released from March 2026.
- Google Gemini API: Per million tokens, with dated price changes published in advance — the current Gemini 3.x rates are explicitly promotional through 31 December 2026 and roughly double on 1 January 2027. A free tier exists, and its content is used to improve Google's products where the paid tier's is not.
- Input price, top model
- OpenAI: $10 per million input tokens for gpt-6-astra at short context, rising to $20 above the short-context threshold. gpt-5.6-sol is $4 and gpt-5.6-terra $2.
- Google Gemini API: $0.75 per million input tokens for Gemini 3.8 Flash through 31 December 2026, then $1.50. Gemini 3.1 Pro, still preview, is $2.00 for prompts up to 200k tokens and $4.00 above.
- Output price, top model
- OpenAI: $50 per million output tokens for gpt-6-astra at short context, $75 at long context.
- Google Gemini API: $3.75 per million output tokens for Gemini 3.8 Flash through 31 December 2026, then $7.50. Thinking tokens are billed as output.
- Input price, cheapest model
- OpenAI: $0.20 per million input tokens for gpt-5.6-luna at short context, with output at $1.20.
- Google Gemini API: $0.30 per million input tokens for Gemini 3.5 Flash-Lite, with output at $2.50.
- Context window
- OpenAI: 1,050,000 tokens on gpt-6-astra, of which at most 922,000 may be input.
- Google Gemini API: 1,048,576 tokens for Gemini 3.8 Flash. Read from the Vertex AI model card: the Gemini API docs build their model cards client-side and publish no figure a fetch can read.
- Max output tokens
- OpenAI: 128,000 tokens on gpt-6-astra.
- Google Gemini API: 65,536 tokens for Gemini 3.8 Flash, and Google counts thinking tokens as output.
- Batch discount
- OpenAI: 50% off input and output through the Batch API: gpt-6-astra falls from $10/$50 to $5/$25 at short context.
- Google Gemini API: 50% off through the Batch API, which is a paid-tier feature.
Pick the criteria you care about. The chart counts how many of them lean toward each provider — the same read as scanning the bars below, just totalled for the ones you chose.
OpenAI 0
Google Gemini API 0
At a glance.
| Criterion | OpenAI | Google Gemini API |
|---|---|---|
| Pricing | ||
| Pricing model | Per million tokens, with a second rate above the short-context threshold — long-context input and output cost roughly double. Batch, Flex, Fast and standard tiers are priced separately, and regional processing adds a 10% uplift on models released from March 2026. | Per million tokens, with dated price changes published in advance — the current Gemini 3.x rates are explicitly promotional through 31 December 2026 and roughly double on 1 January 2027. A free tier exists, and its content is used to improve Google's products where the paid tier's is not. |
| Inference | ||
| Input price, top model | $10 per million input tokens for gpt-6-astra at short context, rising to $20 above the short-context threshold. gpt-5.6-sol is $4 and gpt-5.6-terra $2. | $0.75 per million input tokens for Gemini 3.8 Flash through 31 December 2026, then $1.50. Gemini 3.1 Pro, still preview, is $2.00 for prompts up to 200k tokens and $4.00 above. |
| Output price, top model | $50 per million output tokens for gpt-6-astra at short context, $75 at long context. | $3.75 per million output tokens for Gemini 3.8 Flash through 31 December 2026, then $7.50. Thinking tokens are billed as output. |
| Input price, cheapest model | $0.20 per million input tokens for gpt-5.6-luna at short context, with output at $1.20. | $0.30 per million input tokens for Gemini 3.5 Flash-Lite, with output at $2.50. |
| Context window | 1,050,000 tokens on gpt-6-astra, of which at most 922,000 may be input. | 1,048,576 tokens for Gemini 3.8 Flash. Read from the Vertex AI model card: the Gemini API docs build their model cards client-side and publish no figure a fetch can read. |
| Max output tokens | 128,000 tokens on gpt-6-astra. | 65,536 tokens for Gemini 3.8 Flash, and Google counts thinking tokens as output. |
| Prompt caching | Supported | Supported |
| Batch discount | 50% off input and output through the Batch API: gpt-6-astra falls from $10/$50 to $5/$25 at short context. | 50% off through the Batch API, which is a paid-tier feature. |
Where they differ.
Pricing model
- OpenAI
- Per million tokens, with a second rate above the short-context threshold — long-context input and output cost roughly double. Batch, Flex, Fast and standard tiers are priced separately, and regional processing adds a 10% uplift on models released from March 2026.
- Google Gemini API
- Per million tokens, with dated price changes published in advance — the current Gemini 3.x rates are explicitly promotional through 31 December 2026 and roughly double on 1 January 2027. A free tier exists, and its content is used to improve Google's products where the paid tier's is not.
Sources (2) →Sources ↓
- Pricing — OpenAI API docs ↗
“Prices per 1M tokens. [...] Regional processing (data residency) endpoints are charged a 10% uplift for models released on or after March 5, 2026 [...] Priority processing was renamed Fast mode on July 30, 2026.”
Read 2026-09-06 · official pricing
- Gemini Developer API Pricing ↗
“Paid Tier, per 1M tokens in USD [...] $0.75 through December 31, 2026. $1.50 starting January 1, 2027. [...] Used to improve our products | Yes | No”
Read 2026-09-06 · official pricing
Input price, top model
- OpenAI
- $10 per million input tokens for gpt-6-astra at short context, rising to $20 above the short-context threshold. gpt-5.6-sol is $4 and gpt-5.6-terra $2.
- Google Gemini API
- $0.75 per million input tokens for Gemini 3.8 Flash through 31 December 2026, then $1.50. Gemini 3.1 Pro, still preview, is $2.00 for prompts up to 200k tokens and $4.00 above.
Sources (2) →Sources ↓
- Pricing — OpenAI API docs ↗
“| gpt-6-astra | $10.00 | $1.00 | $12.50 | $50.00 | $20.00 | $2.00 | $25.00 | $75.00 | [...] | gpt-5.6-sol | $4.00 [...] | gpt-5.6-terra | $2.00”
Read 2026-09-06 · official pricing
- Gemini Developer API Pricing ↗
“Gemini 3.8 Flash [...] Input price | Free of charge | $0.75 through December 31, 2026. $1.50 starting January 1, 2027. [...] Gemini 3.1 Pro Preview [...] Input price | Not available | $2.00, prompts <= 200k tokens $4.00, prompts > 200k tokens”
Read 2026-09-06 · official pricing
Output price, top model
- OpenAI
- $50 per million output tokens for gpt-6-astra at short context, $75 at long context.
- Google Gemini API
- $3.75 per million output tokens for Gemini 3.8 Flash through 31 December 2026, then $7.50. Thinking tokens are billed as output.
Sources (2) →Sources ↓
- Pricing — OpenAI API docs ↗
“| gpt-6-astra | $10.00 | $1.00 | $12.50 | $50.00 | $20.00 | $2.00 | $25.00 | $75.00 |”
Read 2026-09-06 · official pricing
- Gemini Developer API Pricing ↗
“Output price (including thinking tokens) | Free of charge | $3.75 through December 31, 2026. $7.50 starting January 1, 2027.”
Read 2026-09-06 · official pricing
Input price, cheapest model
- OpenAI
- $0.20 per million input tokens for gpt-5.6-luna at short context, with output at $1.20.
- Google Gemini API
- $0.30 per million input tokens for Gemini 3.5 Flash-Lite, with output at $2.50.
Sources (2) →Sources ↓
- Pricing — OpenAI API docs ↗
“| gpt-5.6-luna | $0.20 | $0.02 | $0.25 | $1.20 | $0.40 | $0.04 | $0.50 | $1.80 |”
Read 2026-09-06 · official pricing
- Gemini Developer API Pricing ↗
“Gemini 3.5 Flash-Lite [...] Input price | Free of charge | $0.30 (text / image / video / audio) Output price (including thinking tokens) | Free of charge | $2.50”
Read 2026-09-06 · official pricing
Context window
1,050,000 tokens on gpt-6-astra, of which at most 922,000 may be input.
1,048,576 tokens for Gemini 3.8 Flash. Read from the Vertex AI model card: the Gemini API docs build their model cards client-side and publish no figure a fetch can read.
Sources (2) →Sources ↓
- gpt-6-astra — OpenAI API docs ↗
“- 1,050,000 context window - Maximum input tokens: 922,000”
Read 2026-09-06 · official docs
- Gemini 3.8 Flash — Vertex AI model card, Google Cloud ↗
“Token limits Context window 1,048,576 Maximum output tokens 65,536”
Read 2026-09-06 · official docs
Max output tokens
128,000 tokens on gpt-6-astra.
65,536 tokens for Gemini 3.8 Flash, and Google counts thinking tokens as output.
Sources (2) →Sources ↓
- gpt-6-astra — OpenAI API docs ↗
“- 128,000 max output tokens”
Read 2026-09-06 · official docs
- Gemini 3.8 Flash — Vertex AI model card, Google Cloud ↗
“Token limits Context window 1,048,576 Maximum output tokens 65,536”
Read 2026-09-06 · official docs
Batch discount
- OpenAI
- 50% off input and output through the Batch API: gpt-6-astra falls from $10/$50 to $5/$25 at short context.
- Google Gemini API
- 50% off through the Batch API, which is a paid-tier feature.
Sources (2) →Sources ↓
- Pricing — OpenAI API docs ↗
“Batch pricing data | Model | Short context input [...] | gpt-6-astra | $5.00 | $0.50 | $6.25 | $25.00 | $10.00 | $1.00 | $12.50 | $37.50 |”
Read 2026-09-06 · official pricing
- Gemini Developer API Pricing ↗
“Batch API (50% cost reduction) [...] Access to Context caching”
Read 2026-09-06 · official pricing
Which should you choose?
Choose OpenAI if…
Work that fits inside the short-context rate, where the cheapest tier is $0.20 per million input tokens and the batch tier halves everything above it.
Editorial · Palash Bagchi · approved
Choose Google Gemini API if…
Getting to a working prototype without a card, then staying on the cheapest frontier-adjacent rates in this set — $0.75 per million input tokens is well under half what Anthropic and OpenAI charge for their top models.
Editorial · Palash Bagchi · approved
Consider something else if…
- OpenAI: Long prompts cross into the long-context rate and roughly double the bill, which is a cliff the flat-rate vendors do not have.
- Google Gemini API: The rates are dated: they roughly double on 1 January 2027, free-tier content is used to improve Google's products, and rate limits are not published anywhere you can read before signing up.
Documented by only one.
These criteria are published by one provider and not the other. An absence here means we have not found a source, not that the feature is missing.
Questions this comparison answers.
Should I choose OpenAI or Google Gemini API?
Pick OpenAI if Work that fits inside the short-context rate, where the cheapest tier is $0.20 per million input tokens and the batch tier halves everything above it.
Pick Google Gemini API if Getting to a working prototype without a card, then staying on the cheapest frontier-adjacent rates in this set — $0.75 per million input tokens is well under half what Anthropic and OpenAI charge for their top models.
