# GPT-5 Codex

> GPT-5 Codex is a version of GPT-5 optimized for agentic coding in Codex or similar environments, available exclusively through the Responses API with regular underlying snapshot refreshes. It supports a 400,000-token input context with 128,000 output tokens, text and image inputs, and exposes reasoning tokens, streaming, function calling, and structured outputs.


**ID**: `openai/gpt-5-codex`  
**Creator**: OpenAI  
**Category**: text  
**Context**: 400K tokens  
**Pricing**: $1.25 / $10.00 per 1M · billed by your provider (BYOK)  
**Released**: 2025-09-15  
**Web page**: https://anyrouter.dev/model/openai/gpt-5-codex

**Input modalities**: text, image  
**Output modalities**: text  

**Tokenizer**: GPT

**Capabilities**: chat, coding, reasoning, streaming, function-calling, vision

## Usage

**Endpoint**: `POST https://anyrouter.dev/api/v1/chat/completions`

```bash
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-5-codex",
  "messages": [
    {
      "role": "user",
      "content": "Say hi in 3 words."
    }
  ]
}'
```

## Providers

| Provider | Input | Output |
| --- | --- | --- |
| openai-byok | $1.25/M (list) | $10.00/M (list) |
| opencode-zen-byok | $1.25/M (list) | $10.00/M (list) |
| vercel-byok | $1.25/M (list) | $10.00/M (list) |

BYOK routes are billed by your own provider key — AnyRouter charges $0. Rates marked (list) are the provider's published list price.

## Benchmarks

- **GPQA Diamond**: 0.8
- **HLE**: 0.3
- **τ²-Bench Telecom**: 0.9
- **SciCode**: 0.4
