# GPT-5.2 Codex - Core.Today AI API > Latest Codex generation built on the GPT-5.2 base. Brings GPT-5.2's stronger reasoning to agentic coding harnesses, served via the OpenAI Responses API. - **Provider**: OpenAI - **Model ID**: gpt-5.2-codex - **Category**: LLM - **Credits**: 15 per 1K tokens (avg) - **Speed**: Medium - **Quality**: Ultra ## Model Specifications - **Context Window**: 400K tokens - **Max Output**: 128K tokens - **Training Cutoff**: 2025-03 - **Supported Formats**: text, json, markdown - **Compatible SDK**: OpenAI ### Capabilities - Vision (image input) - Function Calling - Streaming - JSON Mode - System Prompt ### Token Pricing (per 1M tokens) - **Input Tokens**: 3,251.5 credits ($2.17) - **Output Tokens**: 26,012 credits ($17.34) - **Cached Tokens**: 325.15 credits ($0.22) ## Features - Latest Codex generation on the GPT-5.2 base - Optimized for agentic coding harnesses (Codex-style) - Served via the Responses API - this gateway routes Codex models to /v1/responses, not chat completions - 400K context window - Cached input tokens for cost savings on repeated context ## Use Cases - Hardest coding tasks needing the newest Codex reasoning - Coding agents and autonomous dev loops - Complex debugging and architecture-level changes - Code review automation with high accuracy requirements ## API Endpoint Base URL: https://api.core.today Endpoint: POST /llm/openai/v1/responses ## Authentication Header: Authorization: Bearer YOUR_API_KEY Note: LLM endpoints use OpenAI-compatible format with Authorization Bearer token. ## Input Parameters ### Required - **model**: string (default: gpt-5.2-codex) - Model identifier - **input**: string | array - Responses API input: a plain string or an array of input items (messages, tool results) ### Optional - **instructions**: string - System-level instructions for the run - **max_output_tokens**: integer - Maximum tokens in the response (Responses API field; not max_tokens) - **stream**: boolean (default: false) - Enable Server-Sent Events streaming ## Examples ### Complex Coding Task Responses API request using the newest Codex generation ```json { "model": "gpt-5.2-codex", "input": "Diagnose why this async job queue occasionally drops tasks under load, then propose and implement a fix:\n\n", "max_output_tokens": 6000 } ``` ## Response Format ```json { "id": "chatcmpl-abc123", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Response text here" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 100, "completion_tokens": 50, "total_tokens": 150 } } ``` ## Tips - Works with the OpenAI SDK - set base_url to https://ai.api.core.today/llm/openai/v1 and use client.responses.create() - Codex models are served via the Responses API (POST /llm/openai/v1/responses), not chat completions - Cached input tokens are billed at a ~10x discount - reuse long repository context across turns - Use GPT-5.1 Codex Mini for lighter tasks - GPT-5.2 Codex is priced for the hardest work ## Documentation https://platform.openai.com/docs/models