LLM API
OpenAIText generationReleased January 14, 2026Deprecated

GPT-5.2 Codex

GPT-5.2 Codex costs $1.75 per 1M input tokens and $14 per 1M output tokens on LLM API, with a 400K-token context window.

Pricing

Served by Azure, the only provider.

GPT-5.2 Codex prices on LLM API
Input$1.75per 1M tokens
Output$14per 1M tokens
Cache read$0.175per 1M tokens
Web search$0.01per search

Features

  • ToolsYes
  • Parallel tool callsNo
  • Image inputYes
  • ReasoningYes

    Levels: none, low, medium, high, xhigh

  • Prompt cachingYes
  • Structured outputsYes
  • JSON modeYes
  • StreamingYes
  • Web searchYes
  • Also acceptscodex-latest

Call GPT-5.2 Codex

POST /v1/responsesSet LLMAPI_KEY to your LLM API key.Responses docs

import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

response = client.responses.create(
    model="gpt-5.2-codex",
    input="Hello",
)
print(response.output_text)

More from OpenAI

All OpenAI text models

Prices synced .

You've been invited to LLM API

Top up $50 or more and the friend who invited you gets $20 in credits. We pay the $20; your credits stay yours. Referral terms

Sign up