# OpenAI vs Google Gemini API

Canonical: https://inetgeek.com/compare/openai-vs-google-gemini/

Every value below is read from OpenAI's and Google Gemini API's own documentation. See https://inetgeek.com/methodology/ for how.

## At a glance

| Criterion | OpenAI | Google Gemini API |
| --- | --- | --- |
| 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. |
| 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. ([source](https://platform.openai.com/docs/pricing))
- 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. ([source](https://ai.google.dev/gemini-api/docs/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. ([source](https://platform.openai.com/docs/pricing))
- 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. ([source](https://ai.google.dev/gemini-api/docs/pricing))

### Output price, top model

- OpenAI: $50 per million output tokens for gpt-6-astra at short context, $75 at long context. ([source](https://platform.openai.com/docs/pricing))
- 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. ([source](https://ai.google.dev/gemini-api/docs/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. ([source](https://platform.openai.com/docs/pricing))
- Google Gemini API: $0.30 per million input tokens for Gemini 3.5 Flash-Lite, with output at $2.50. ([source](https://ai.google.dev/gemini-api/docs/pricing))

### Context window

- OpenAI: 1,050,000 tokens on gpt-6-astra, of which at most 922,000 may be input. ([source](https://platform.openai.com/docs/models/gpt-6-astra))
- 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. ([source](https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-8-flash))

### Max output tokens

- OpenAI: 128,000 tokens on gpt-6-astra. ([source](https://platform.openai.com/docs/models/gpt-6-astra))
- Google Gemini API: 65,536 tokens for Gemini 3.8 Flash, and Google counts thinking tokens as output. ([source](https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-8-flash))

### 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. ([source](https://platform.openai.com/docs/pricing))
- Google Gemini API: 50% off through the Batch API, which is a paid-tier feature. ([source](https://ai.google.dev/gemini-api/docs/pricing))

## Which should you choose?

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.

Consider something else: 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.

Consider something else: 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

- Free tier: Google Gemini API: Yes
- Rate limits: Google Gemini API: Tied to a usage tier — Free, then Tier 1/2/3 unlocked by cumulative spend — and enforced as requests per minute, input tokens per minute and requests per day. Google publishes no numbers in the docs: limits are viewed in AI Studio and are stated not to be guaranteed.

## 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.
