Skip to main content
Core.Today
|
OpenAIMediumUltra

GPT-5.1 Codex Max

OpenAI's long-horizon agentic coding flagship in the GPT-5.1 Codex family. Supports compaction to keep very long coding sessions within context, and is served via the OpenAI Responses API.

2,322.5/18,580credits
input / output ยท per 1M tokens
Long-horizon agentic coding flagship
Compaction support for very long sessions beyond the raw context window
Served via the Responses API - this gateway routes Codex models to /v1/responses, not chat completions
400K context window
Cached input tokens for cost savings on repeated context

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

Model Specifications

Context Window
400K
tokens
Max Output
128K
tokens
Training Cutoff
2025-03
Compatible SDK
OpenAI

Capabilities

Vision
Function Calling
Streaming
JSON Mode
System Prompt

Token Pricing (per 1M tokens)

Token TypeCreditsUSD Equivalent
Input Tokens2,322.5$1.55
Output Tokens18,580$12.39
Cached Tokens232.25$0.15

* 1,500 credits โ‰ˆ $1 (actual charges may vary based on usage)

Quick Start

curl -X POST "https://api.core.today/llm/openai/v1/responses" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "gpt-5.1-codex-max",
  "input": "Migrate this codebase's HTTP layer from callbacks to async/await. Work file by file and keep tests green.",
  "max_output_tokens": 8000
}'

Parameters

ParameterTypeRequiredDefaultDescription
modelstringYesgpt-5.1-codex-maxModel identifier
inputstring | arrayYes-Responses API input: a plain string or an array of input items (messages, tool results)
instructionsstringNo-System-level instructions for the run
max_output_tokensintegerNo-Maximum tokens in the response (Responses API field; not max_tokens)
streambooleanNofalseEnable Server-Sent Events streaming

Examples

Long-Horizon Refactor

Responses API request for a large multi-file task

curl -X POST "https://api.core.today/llm/openai/v1/responses" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "gpt-5.1-codex-max",
  "input": "Migrate this codebase's HTTP layer from callbacks to async/await. Work file by file and keep tests green.",
  "max_output_tokens": 8000
}'

Tips & Best Practices

1Works with the OpenAI SDK - set base_url to https://ai.api.core.today/llm/openai/v1 and use client.responses.create()
2Codex models are served via the Responses API (POST /llm/openai/v1/responses), not chat completions
3Compaction lets sessions run far beyond the raw context window - prefer Codex Max for very long agent runs
4Same token pricing as GPT-5.1 Codex - choose Max for long-horizon work, not for cost reasons

Use Cases

Multi-hour autonomous coding sessions
Large refactors spanning many files
Project-scale migrations and upgrades
Complex debugging with long tool-use trajectories