GPT-5.1 Codex mini

OpenAIMCP Tool CallReasoning
openai/gpt-5.1-codex-miniClosed API

Coding-optimized GPT model for repository edits, reviews, and agentic software work

Benchmark Pricing$0.25 / 1M in$2.00 / 1M out$0.03 cache read
Context: 400,000 tokens•Max Output: 128,000 tokens•Knowledge: 2024-09-30•Released: 2025-11-13

TECHNICAL SPECIFICATIONS

Context Window400,000400K tokens
Max Output128,000128K tokens
LicenseProprietaryCloud API only
Input Modalities
TextVision
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ GPT-5.1 Codex mini natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 400,000 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

API CALL INVOCATION EXAMPLE

// Example: Calling GPT-5.1 Codex mini via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

const response = await client.chat.completions.create({
  model: "openai/gpt-5.1-codex-mini",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

15 providers
NanoGPTopenai/gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
LLM Gatewayazure/gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Poeopenai/gpt-5.1-codex-mini
$0.22 / $1.80$0.02 cache
AIHubMixgpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Vercel AI Gatewayopenai/gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
OpenCodegpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Eden AIazure/gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Ofoxopenai/gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Azure Cognitive Servicesgpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Kilo Gatewayopenai/gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
ZenMuxopenai/gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
DevPass (LLM Gateway)gpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Jiekou.AIgpt-5.1-codex-mini
$0.24 / $1.90$0.02 cache
Heliconegpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache
Azuregpt-5.1-codex-mini
$0.25 / $2.00$0.03 cache

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.03 / 1M tokens, saving up to 90% on repetitive MCP tool definitions and system instructions.

MODEL RESOURCES