All insights

Pricing and plans

GPT-4o Token Cost: API Rates and a Budget Example

See GPT-4o API input, cached-input, and output rates, calculate an example budget, and check what its deprecated status means for production use.

Illustration for Gpt 4o token cost

GPT-4o API token rates

OpenAI’s GPT-4o model page identifies the API model as gpt-4o, with default snapshot gpt-4o-2024-08-06, and lists these standard text-token prices in USD per 1 million tokens:

Token category Price per 1M tokens Approx. price per 1K tokens
Input $2.50 $0.0025
Cached input $1.25 $0.00125
Output $10.00 $0.01

These are API usage rates, not a ChatGPT subscription price. OpenAI labels gpt-4o deprecated. A separate deprecations notice schedules certain GPT-4-series models for API removal on January 14, 2027, but whether that deadline applies to gpt-4o is not established here. Check the model’s optional shutdown_date through the Models API and confirm your account’s access before building around it. (GPT-4o model documentation; API deprecations)

How to calculate GPT-4o token cost

For the rates above, calculate each category separately:

Estimated cost = (uncached input tokens × $2.50 + cached input tokens × $1.25 + output tokens × $10.00) ÷ 1,000,000

Use token counts from your API usage data when possible. The calculation assumes standard rates and excludes any separately charged tools or services.

Example: 1 million input tokens, 200,000 cached

Suppose a workload uses 1,000,000 input tokens, of which 200,000 qualify as cached, plus 200,000 output tokens:

  • Uncached input: 800,000 ÷ 1,000,000 × $2.50 = $2.00
  • Cached input: 200,000 ÷ 1,000,000 × $1.25 = $0.25
  • Output: 200,000 ÷ 1,000,000 × $10.00 = $2.00
  • Estimated total: $4.25

This is an illustrative estimate, not a prediction of an invoice. The cached-input rate applies only to tokens OpenAI counts as cached; its prompt-caching documentation describes automatic caching for eligible repeated prompt prefixes and shows cached-token usage in API responses. (Prompt Caching in the API)

What this estimate covers—and what it doesn’t

The prices above are from OpenAI’s GPT-4o API model page. They should not be substituted with Azure OpenAI rates or another provider’s rates, which are separate pricing channels. They also are not ChatGPT plan prices. OpenAI notes that some tool-specific models have a fee per tool call, so include applicable tool charges separately rather than assuming this token calculation covers them. (GPT-4o model documentation)

The GPT-4o model page describes text and image input with text output, but the calculation here uses the model page’s text-token rates. For a multimodal workload, use the usage categories and charges applicable to the actual request rather than estimating image processing from word counts. Because OpenAI marks gpt-4o deprecated—and the cited removal notice does not establish whether its January 14, 2027 deadline applies to this model—check the model’s shutdown date and your API access before treating projected spend as a production budget. (GPT-4o model documentation; API deprecations)

Sources

GPT-4o Model | OpenAI API

Deprecations | OpenAI API

Prompt Caching in the API | OpenAI

Contact us