# Grok 4.20 Reasoning - Core.Today AI API > Grok 4.20 reasoning variant (0309 snapshot) - chain-of-thought reasoning with a 1M-token context window. Reasoning tokens are billed additively on top of completion tokens. - **Provider**: xAI - **Model ID**: grok-4.20-0309-reasoning - **Category**: LLM - **Credits**: 3 per 1K tokens (avg) - **Speed**: Medium - **Quality**: Ultra ## Model Specifications - **Context Window**: 1M tokens - **Max Output**: 33K tokens - **Training Cutoff**: 2025-11 - **Supported Formats**: text, json, markdown - **Compatible SDK**: OpenAI ### Capabilities - Function Calling - Streaming - JSON Mode - System Prompt ### Token Pricing (per 1M tokens) - **Input Tokens**: 2,322.5 credits ($1.55) - **Output Tokens**: 4,645 credits ($3.10) - **Cached Tokens**: 371.6 credits ($0.25) ## Features - Additive reasoning-token billing (accurate metering) - 1M context window - OpenAI-compatible API (chat completions) - Prompt caching with discounted cache reads - Long-context tier: prompts reaching 200K tokens bill the whole request at 2x rates ## Use Cases - Long-document analysis and summarization - Coding assistants and agents - Multi-turn chat with large shared context ## API Endpoint Base URL: https://api.core.today Endpoint: POST /llm/grok/v1/chat/completions ## Authentication Header: Authorization: Bearer YOUR_API_KEY Note: LLM endpoints use OpenAI-compatible format with Authorization Bearer token. ## Input Parameters ### Required - **model**: string - Model ID, e.g. "grok-4.20-0309-reasoning". - **messages**: array - Chat messages in OpenAI format (system/user/assistant roles). ### Optional - **temperature**: number (default: 0.7) - Sampling temperature (0-2). - **max_tokens**: integer (default: 2048) - Maximum completion tokens. - **stream**: boolean (default: false) - Stream the response as server-sent events. ## Examples ### Chat completion OpenAI-compatible chat completion request ```json { "model": "grok-4.20-0309-reasoning", "messages": [ { "role": "user", "content": "Summarize the attached report in 5 bullets." } ], "max_tokens": 1024 } ``` ## 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/grok/v1 - Keep prompts under 200K tokens to stay on the standard rate (2x above that) - Cache reads are billed at a discounted rate - reuse long system prompts ## Documentation https://docs.x.ai/docs/models