# GPT-5 - Core.Today AI API > OpenAI's latest flagship model. Delivers exceptional performance across reasoning, coding, and creative tasks with a massive 1M token context window and 32K output tokens. Supports vision, function calling, and JSON mode. - **Provider**: OpenAI - **Model ID**: gpt-5 - **Category**: LLM - **Credits**: 3 per 1K tokens (avg) - **Speed**: Fast - **Quality**: Ultra ## 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**: 2,322 credits ($1.55) - **Output Tokens**: 18,580 credits ($12.39) - **Cached Tokens**: 232.25 credits ($0.15) ## Features - 1M token context window - 32K max output tokens - Advanced reasoning capabilities - Native vision (text + image) - Function calling & JSON mode - Structured outputs - Streaming support ## Use Cases - Complex multi-step reasoning tasks - Advanced code generation and review - Long document summarization and analysis - Data extraction from documents/images - Agentic workflows and tool use - Enterprise content processing ## 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) - Model identifier ### Optional - **max_completion_tokens**: integer (default: 4096) - Maximum tokens in response (up to 32768). Note: use max_completion_tokens, not max_tokens - **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 - **reasoning_effort**: string (default: medium) - Reasoning effort level: low, medium, or high ## Examples ### Complex Analysis Multi-step reasoning and analysis with GPT-5 ```json { "model": "gpt-5", "messages": [ { "role": "system", "content": "You are an expert analyst. Provide thorough, well-structured analysis." }, { "role": "user", "content": "Analyze the potential impacts of quantum computing on current encryption standards and suggest a migration roadmap for enterprise systems." } ], "max_completion_tokens": 4000 } ``` ### Code Generation Generate production-quality code with GPT-5 ```json { "model": "gpt-5", "messages": [ { "role": "system", "content": "You are an expert software engineer. Write clean, well-documented code." }, { "role": "user", "content": "Create a TypeScript rate limiter middleware for Express.js that uses a sliding window algorithm with Redis for distributed rate limiting." } ], "max_completion_tokens": 4000 } ``` ### JSON Data Extraction Extract structured data from unstructured text ```json { "model": "gpt-5", "messages": [ { "role": "system", "content": "Extract structured data from the given text. Always respond with valid JSON." }, { "role": "user", "content": "Parse this invoice: 'Invoice #2025-0842 from Acme Corp to Beta LLC, dated August 15 2025. Items: 10x Widget A at $25.00, 5x Widget B at $50.00. Tax: 10%. Shipping: $15.00'" } ], "response_format": { "type": "json_object" }, "max_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 - Latest flagship model — best overall performance across all tasks - 1M context window ideal for analyzing entire codebases or long documents - Excels at complex reasoning, coding, and creative tasks - Use lower temperature (0.1-0.3) for coding and factual tasks - Vision works with URLs or base64-encoded images - Streaming recommended for long responses - Use function calling for structured tool interactions ## Documentation https://platform.openai.com/docs/models/gpt-5