OpenAI: GPT 5.1 Codex Max

gpt-5.1-codex-max

GPT 5.1 Codex Max costs $3.25 per million input tokens and $26.00 per million output tokens, supports 400K context, and is available through the OpenAI-compatible API.

Modalities

Text + Image → Text

Input / output price

$3.25 / $26.00 per 1M

Context

400K · max output 128K

Capabilities

ReasoningVisionTool callingLong context

Pricing

Billed per token actually used and deducted from your credits.

ItemUSD per 1M tokens
Input$3.25
Output$26.00
Cached input$0.325

Calculator

Drag the sliders to estimate what this model will cost.

Per request
$0.0306
Per day
$15.28
Per month (30 days)
$458.25

GPT 5.1 Codex Max: input $3.25/M · output $26/M · cached input $0.325/M

Request with these settings
curl https://api.geniusrelaygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-5.1-codex-max", "max_tokens": 800,
       "messages": [{"role": "user", "content": "…"}]}'

Code samples

OpenAI-compatible. Set the base URL to https://api.geniusrelaygpt.com/v1 and the model to gpt-5.1-codex-max.

curl https://api.geniusrelaygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.1-codex-max",
    "stream": true,
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Use it in a client: Cursor · Cline · SillyTavern · Codex

Parameters

Common OpenAI parameters can be passed as-is.

temperaturetop_pmax_tokensstreamstoppresence_penaltyfrequency_penaltyseed

FAQ

How is GPT 5.1 Codex Max billed?
Input is $3.25 and output is $26.00 per million tokens; cached input is $0.325. The charge for every request is listed in Usage Logs in the console.
How long is the context window?
400K tokens. In a long conversation every turn is billed for the full input, so keep the history under control.
Does it support streaming?
Yes. Add "stream": true to the request to receive server-sent events in the OpenAI format.
GPT 5.1 Codex Max API pricing · GeniusRelay