# DeepInfra vs OpenAI

Canonical: https://inetgeek.com/compare/deepinfra-vs-openai/

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

## At a glance

| Criterion | DeepInfra | OpenAI |
| --- | --- | --- |
| Pricing model | Two products on one bill: per-token serverless inference with a separate cached-input rate for each model, and dedicated GPUs billed per minute and invoiced weekly. Models without per-token pricing are billed for inference execution time instead. | 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. |
| Input price, top model | $1.30 per million input tokens for DeepSeek-V4-Pro, the most expensive model in its catalogue. Cached input is $0.10. | $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. |
| Output price, top model | $2.60 per million output tokens for DeepSeek-V4-Pro. | $50 per million output tokens for gpt-6-astra at short context, $75 at long context. |
| Input price, cheapest model | $0.06 per million input tokens for DeepSeek-V4-Flash-0731, with cached input at $0.015 and output at $0.18. DeepSeek itself charges $0.44 at peak for the same checkpoint and Fireworks $0.22. | $0.20 per million input tokens for gpt-5.6-luna at short context, with output at $1.20. |
| Context window | 1024k tokens on the DeepSeek V4 models it serves; 160k on the V3 generation. The window is the model's rather than a platform limit. | 1,050,000 tokens on gpt-6-astra, of which at most 922,000 may be input. |
| Prompt caching | Supported | Supported |

## Where they differ

### Pricing model

- DeepInfra: Two products on one bill: per-token serverless inference with a separate cached-input rate for each model, and dedicated GPUs billed per minute and invoiced weekly. Models without per-token pricing are billed for inference execution time instead. ([source](https://deepinfra.com/pricing))
- 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))

### Input price, top model

- DeepInfra: $1.30 per million input tokens for DeepSeek-V4-Pro, the most expensive model in its catalogue. Cached input is $0.10. ([source](https://deepinfra.com/pricing))
- 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))

### Output price, top model

- DeepInfra: $2.60 per million output tokens for DeepSeek-V4-Pro. ([source](https://deepinfra.com/pricing))
- OpenAI: $50 per million output tokens for gpt-6-astra at short context, $75 at long context. ([source](https://platform.openai.com/docs/pricing))

### Input price, cheapest model

- DeepInfra: $0.06 per million input tokens for DeepSeek-V4-Flash-0731, with cached input at $0.015 and output at $0.18. DeepSeek itself charges $0.44 at peak for the same checkpoint and Fireworks $0.22. ([source](https://deepinfra.com/pricing))
- 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))

### Context window

- DeepInfra: 1024k tokens on the DeepSeek V4 models it serves; 160k on the V3 generation. The window is the model's rather than a platform limit. ([source](https://deepinfra.com/pricing))
- 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))

## Which should you choose?

Pick DeepInfra if Running open-weight models at the lowest published per-token rates here — DeepSeek-V4-Flash at $0.06 per million input is a fraction of what the lab itself charges — with dedicated H100s at $2.20 an hour if throughput demands it.

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.

Consider something else: DeepInfra — Only some models carry per-token pricing; the rest bill for inference execution time, which is a different and harder thing to forecast.

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.

## Documented by only one

- Max output tokens: OpenAI: 128,000 tokens on gpt-6-astra.
- 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.
- H100 SXM, per GPU-hour: DeepInfra: $2.20 per GPU-hour for a dedicated H100 80GB — below every dedicated cloud in this dataset. A100 80GB is $0.89, H200 $2.69, B200 $3.69. Billed in minute granularity, invoiced weekly.
- Largest GPU offered: DeepInfra: 270GB per GPU on a B300, at $4.89 per GPU-hour.

## Questions this comparison answers

**Should I choose DeepInfra or OpenAI?**

Pick DeepInfra if Running open-weight models at the lowest published per-token rates here — DeepSeek-V4-Flash at $0.06 per million input is a fraction of what the lab itself charges — with dedicated H100s at $2.20 an hour if throughput demands it.
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.
