OpenAI: GPT-5.1-Codex Cost Calculator for API Tokens

Model: OpenAI: GPT-5.1-Codex, Context: 400000, Cost: $1.25 per 1M input tokens, $10 per 1M output tokens

Note: Calculation is approximate based on public data. Prices may change, check official websites.

This calculator estimates the API token costs for the OpenAI: GPT-5.1-Codex model, a specialized version of GPT-5.1 optimized for software engineering and coding workflows.

The GPT-5.1-Codex model offers a large context window of 400,000 tokens, enabling it to handle complex engineering tasks, from building projects from scratch to large-scale refactoring and code review. It's known for producing cleaner, higher-quality code outputs and adhering closely to developer instructions, making it ideal for agentic coding applications.

The pricing structure is as follows:

  • Input tokens: $1.25 per 1 million tokens
  • Output tokens: $10.00 per 1 million tokens

The total cost is calculated using the formula:

Total Cost = (Input Tokens / 1,000,000) * $1.25 + (Output Tokens / 1,000,000) * $10.00

Example:

If you use 500,000 input tokens and 200,000 output tokens for one request:

  • Input Cost = (500,000 / 1,000,000) * $1.25 = $0.625
  • Output Cost = (200,000 / 1,000,000) * $10.00 = $2.00
  • Total Cost = $0.625 + $2.00 = $2.625