# GPT-5.1 Codex Mini - Core.Today AI API > Cheaper, faster member of the GPT-5.1 Codex family for lighter coding tasks. Keeps the agentic-coding tuning and Responses API interface at roughly one fifth of the Codex price. - **Provider**: OpenAI - **Model ID**: gpt-5.1-codex-mini - **Category**: LLM - **Credits**: 2 per 1K tokens (avg) - **Speed**: Fast - **Quality**: High ## 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**: 464.5 credits ($0.31) - **Output Tokens**: 3,716 credits ($2.48) - **Cached Tokens**: 46.45 credits ($0.03) ## Features - Cheaper, faster Codex tier for lighter coding tasks - 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 - Function calling & streaming support ## Use Cases - Quick code edits and small fixes - High-volume coding automation on a budget - Code explanation and review comments - Draft passes before escalating to Codex or Codex Max ## 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.1-codex-mini) - 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 ### Quick Fix Low-cost Responses API request for a small coding task ```json { "model": "gpt-5.1-codex-mini", "input": "Add null checks to this function and explain the change in one sentence:\n\n", "max_output_tokens": 1000 } ``` ## 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 - About 5x cheaper than GPT-5.1 Codex - ideal for high-volume or draft coding passes - Escalate to GPT-5.1 Codex or Codex Max when tasks span many files or long sessions ## Documentation https://platform.openai.com/docs/models