# OpenAI o4-mini - Core.Today AI API > Fast, cost-effective reasoning model optimized for coding and STEM tasks. Provides strong reasoning at a fraction of the cost of larger reasoning models. - **Provider**: OpenAI - **Model ID**: o4-mini - **Category**: LLM - **Credits**: 2 per 1K tokens (avg) - **Speed**: Fast - **Quality**: Ultra ## Model Specifications - **Context Window**: 200K tokens - **Max Output**: 100K tokens - **Training Cutoff**: 2025-03 - **Supported Formats**: text, markdown, json - **Compatible SDK**: OpenAI ### Capabilities - Vision (image input) - Function Calling - Streaming - JSON Mode - System Prompt ### Token Pricing (per 1M tokens) - **Input Tokens**: 2,044 credits ($1.36) - **Output Tokens**: 8,175 credits ($5.45) ## Features - Optimized for coding/STEM - 200K context window - 100K max output tokens - Fast reasoning - Cost-effective reasoning ## Use Cases - Code generation and review - Scientific calculations - Technical problem solving - Educational applications - Competitive programming ## 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 ### Optional - **max_completion_tokens**: integer - Maximum tokens for completion - **reasoning_effort**: string - Reasoning depth level Options: minimal, low, medium, high ## Examples ### Code Review Review and improve code ```json { "model": "o4-mini", "messages": [ { "role": "user", "content": "Review this code and suggest improvements:\n\ndef fib(n):\n if n <= 1: return n\n return fib(n-1) + fib(n-2)" } ], "max_completion_tokens": 16000, "reasoning_effort": "medium" } ``` ## 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 for coding and STEM tasks - Most cost-effective reasoning model - Use reasoning_effort to balance speed vs depth - Use max_completion_tokens instead of max_tokens ## Documentation https://platform.openai.com/docs/models