openaiVision

OpenAI: GPT-5.1-Codex-Max

GPT-5.1-Codex-Max is OpenAI’s latest agentic coding model, designed for long-running, high-context software development tasks. It is based on an updated version of the 5.1 reasoning stack and trained on agentic...

Context
400k tokens
Input / 1M tokens
$1.25
Output / 1M tokens
$10
Benchmark

Pricing

Input tokens$1.25 per 1M tokens
Output tokens$10 per 1M tokens
Cache read$0.13 per 1M tokens

Technical details

Model IDopenai/gpt-5.1-codex-max
Context window400k tokens
Input modalitiestext, image, pdf
Output modalitiestext
TokenizerGPT
Max output tokens128,000

Use with MegaBrain

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

const response = await client.chat.completions.create({
  model: 'openai/gpt-5.1-codex-max',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use OpenAI: GPT-5.1-Codex-Max?

Get an API key and start making requests in minutes.

Get an API key