GPT-5.1-Codex-Mini

openai/gpt-5.1-codex-mini
VisionToolsJSONReasoning
by OpenAI · 2025-11-13

GPT-5.1-Codex-Mini is a smaller and faster version of GPT-5.1-Codex

ctx400K tokens
Max output128K
Inputimage + text
Outputtext
INPUT$0.25/ 1M tokens
OUTPUT$2.00/ 1M tokens
p50 TTFTCollecting…
p95 TTFTCollecting…
TRAFFICCollecting…

GPT-5.1-Codex-Mini is a model from OpenAI that can be accessed through OrcaRouter. It is part of the GPT-5.1 Codex series, designed for code-centric and reasoning tasks. The 'Mini' designation…

What is GPT-5.1-Codex-Mini?

Who is the intended user?

How does it relate to other GPT-5.1 models?

What access does OrcaRouter provide?

Code samples

Call from any SDK

OpenAI-compatible — keep the SDK you already use

  • OpenAI SDKhttps://api.orcarouter.ai/v1
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.orcarouter.ai/v1",
    api_key=os.environ["ORCAROUTER_API_KEY"],
)

response = client.chat.completions.create(
    model="openai/gpt-5.1-codex-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Supported parameters

  • include_reasoning
  • max_completion_tokens
  • max_tokens
  • reasoning
  • response_format
  • seed
  • stream
  • structured_outputs
  • tool_choice
  • tools

Pricing

Pricing
Input / 1M tokens$0.250
Output / 1M tokens$2.00
Cache read / 1M$0.025
CurrencyUSD

Cost calculator

Tokens / month10MM
Input share70%%
Estimated / month $7.75 · With prompt caching $6.96

Estimate based on list price

Token & cost estimator

Input tokens: 20Cost per request: $0.001005

Estimate only — actual token counts depend on the provider's tokenizer.

Compare monthly costs across models in the LLM cost calculator

Performance

p50 TTFT
Collecting…
Output speed
Collecting…
p95 TTFT
Collecting…
Error rate
100.0%

Public benchmarks

36.4
AA Coding
Better than 33% of models compared
#93 of 138
20.4
AA Intelligence
Better than 31% of models compared
#103 of 150
91.7
AA Math
Better than 80% of models compared
#16 of 82
AIME 2025
91.7
GPQA Diamond
81.3
Humanity's Last Exam
18.5
IFBench
67.9
LiveCodeBench
83.6
Long-Context Recall
66.7
MMLU-Pro
82.0
SciCode
42.6
TerminalBench Hard
33.3
τ²-Bench
62.9
Source: artificialanalysis.ai

Community buzz

What developers are saying this week

Hacker News1 mentions · 7dup 1 vs the previous week

How it compares

GPT-5.1-Codex-MiniGPT-5.2 ProGPT-5.4 ProGPT-5.5
Input $/M$0.25$21.00$60.00$5.00
Output $/M$2.00$168.00$270.00$30.00
Context400K400K1.1M—
Quality6/1010/1010/1010/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

Does OrcaRouter add any markup to the model pricing?
No. OrcaRouter bills GPT-5.1-Codex-Mini at the provider rate of $0.25 per 1M input tokens and $2.00 per 1M output tokens, with zero markup. You pay exactly the same as if you used OpenAI directly.
What is the context window size?
The context window is 400000 tokens, including both text and tokenized images. The maximum output length is 128000 tokens per request.
What are the key strengths of this model?
The model scores 91.7 on the AA Math benchmark, indicating strong performance in mathematical reasoning. It also excels at code generation, supports image and text inputs, and has a very large context and output window. It is a cost-effective option within the GPT-5.1 Codex series.
How does GPT-5.1-Codex-Mini compare to a general-purpose model like GPT-4o?
Codex-Mini is specialized for code and math; GPT-4o is general-purpose. Codex-Mini has a larger context (400000 vs 128000 tokens) and much larger output (128000 vs 4096 tokens). Pricing for Codex-Mini is significantly lower ($0.25/$2.00 vs $5/$15 per 1M tokens). For math and coding tasks, Codex-Mini may be more cost-effective.
How do I call this model through OrcaRouter?
Use the OpenAI-compatible API at https://api.orcarouter.ai/v1 with model ID 'openai/gpt-5.1-codex-mini'. Authentication uses an OrcaRouter API key in the Authorization header. The API supports standard OpenAI parameters and endpoints.
Does OrcaRouter store my prompts or responses?
OrcaRouter acts as a transparent proxy to OpenAI. It does not permanently store prompts or responses; data is transmitted to OpenAI for processing. For specific data handling policies, refer to OrcaRouter's privacy policy and OpenAI's data usage terms.
Can I use images as input?
Yes, the model supports both image and text inputs. Images can be included via the multimodal content format (e.g., as base64-encoded URLs) in the messages array. Each image consumes tokens based on resolution; ensure total tokens stay within the 400000 context window.
Is there a minimum usage commitment?
No. OrcaRouter charges only for consumed tokens. There are no minimum fees, monthly commitments, or subscription requirements. You pay $0.25 per 1M input tokens and $2.00 per 1M output tokens as you use the model.

Embed this badge

OpenAI: GPT-5.1-Codex-Mini•$0.25/M in•—•via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/openai/gpt-5.1-codex-mini" target="_blank"> <img src="https://www.orcarouter.ai/embed/openai/gpt-5.1-codex-mini.svg" alt="OpenAI: GPT-5.1-Codex-Mini on OrcaRouter" /> </a>
Markdown [![OpenAI: GPT-5.1-Codex-Mini](https://www.orcarouter.ai/embed/openai/gpt-5.1-codex-mini.svg)](https://www.orcarouter.ai/models/openai/gpt-5.1-codex-mini)

Model card as data

GET /api/public/models/openai/gpt-5.1-codex-miniOpen
Machine-readable:/llms.txt/llms-full.txt