AI Rate Card

GPT 5.2 Codex · vercel

GPT‑5.2-Codex is a version of GPT‑5.2⁠ further optimized for agentic coding in Codex, including improvements on long-horizon work through context compaction, stronger performance on large code changes like refactors and migrations, improved performance in Windows environments, and significantly stronger cybersecurity capabilities.

Base modelAll models on this baseAll models of the providerto the provider

Input, $/1M $1.75

Output, $/1M $14.00

Cache read $0.17

Cache write —

Context 400 000

Max output 128 000

Accepts images, pdf, text

Last checked 04.11.2026 12:00:14 UTC

Source provider's page

Price alerts

Sign in to follow the price

API

OpenAI-compatible API: the official OpenAI SDKs work with this base URL. Replace YOUR_API_KEY with your key from the provider.

API base URL
https://ai-gateway.vercel.sh/v1
Endpoint
https://ai-gateway.vercel.sh/v1/chat/completions
Model id
openai/gpt-5.2-codex
curl
curl https://ai-gateway.vercel.sh/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/gpt-5.2-codex", "messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 256}'
Python
import requests

r = requests.post(
    "https://ai-gateway.vercel.sh/v1/chat/completions",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
      "model": "openai/gpt-5.2-codex",
      "messages": [
        {
          "role": "user",
          "content": "Hello!"
        }
      ],
      "max_tokens": 256
    },
)
print(r.json())
JavaScript
const r = await fetch("https://ai-gateway.vercel.sh/v1/chat/completions", {
  method: "POST",
  headers: {Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json"},
  body: JSON.stringify({
    "model": "openai/gpt-5.2-codex",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "max_tokens": 256
  }),
});
console.log(await r.json());
Request (JSON)
{
  "model": "openai/gpt-5.2-codex",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "max_tokens": 256
}
Response (JSON)
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "openai/gpt-5.2-codex",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hi! How can I help?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 12,
    "total_tokens": 21
  }
}

The address is taken from the provider's model list; check it against the provider's documentation.

Provider's API documentation

Source: AI Rate Card, https://airatecard.com/en/c/offer%3Avercel%7Copenai/gpt-5.2-codex, prices checked 2026-11-04; seller's page: https://vercel.com/ai-gateway/models/gpt-5.2-codex

Technical details

ID: offer:vercel|openai/gpt-5.2-codex