# GPT-5 Mini - Core.Today AI API > Fast and efficient variant of GPT-5. Delivers strong performance across reasoning, coding, and creative tasks with a 1M token context window and 32K output tokens, at a fraction of the cost of GPT-5. - **Provider**: OpenAI - **Model ID**: gpt-5-mini - **Category**: LLM - **Credits**: 1 per 1K tokens (avg) - **Speed**: Fast - **Quality**: High ## Model Specifications - **Context Window**: 1.0M tokens - **Max Output**: 33K 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 credits ($0.31) - **Output Tokens**: 3,716 credits ($2.48) - **Cached Tokens**: 46.45 credits ($0.03) ## Features - 1M token context window - 32K max output tokens - Fast inference speed - Native vision (text + image) - Function calling & JSON mode - Structured outputs - Cost-effective GPT-5 performance ## Use Cases - General-purpose chat and assistance - Code generation and debugging - Document summarization - Content creation and editing - Data extraction and classification - API integration and automation ## API Endpoint Base URL: https://api.core.today Endpoint: POST /llm/openai/v1/chat/completions ## Authentication Header: Authorization: Bearer YOUR_API_KEY Note: LLM endpoints use OpenAI-compatible format with Authorization Bearer token. ## Input Parameters ### Required - **messages**: array - Array of message objects with role and content - **model**: string (default: gpt-5-mini) - Model identifier ### Optional - **max_completion_tokens**: integer (default: 4096) - Maximum tokens in response (up to 32768). Note: use max_completion_tokens, not max_tokens - **reasoning_effort**: string (default: medium) - Reasoning effort level: low, medium, or high - **stream**: boolean (default: false) - Enable Server-Sent Events streaming - **response_format**: object - Format of response: { type: 'json_object' } for JSON mode - **tools**: array - List of tools (functions) the model can call ## Examples ### Quick Chat Efficient general-purpose conversation with GPT-5 Mini ```json { "model": "gpt-5-mini", "messages": [ { "role": "system", "content": "You are a helpful assistant. Be concise and clear." }, { "role": "user", "content": "Explain the difference between REST and GraphQL APIs, including when to use each." } ], "max_completion_tokens": 2000 } ``` ### Code Debugging Debug code efficiently with GPT-5 Mini ```json { "model": "gpt-5-mini", "messages": [ { "role": "system", "content": "You are an expert debugger. Find and fix bugs in the provided code." }, { "role": "user", "content": "This Python function should return the nth Fibonacci number but it's running too slowly for large n. Optimize it:\n\ndef fib(n):\n if n <= 1:\n return n\n return fib(n-1) + fib(n-2)" } ], "max_completion_tokens": 2000 } ``` ## 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 - Best value for most everyday tasks — strong performance at low cost - 5x cheaper than GPT-5 on input tokens, 5x cheaper on output tokens - 1M context window same as GPT-5 for long document processing - Ideal for high-volume applications where cost matters - Use for chat, summarization, and code tasks - Streaming recommended for responsive user experience ## Documentation https://platform.openai.com/docs/models/gpt-5-mini