Skip to main content
xAIMediumUltra

Grok 4.5

xAI's coding-focused Grok model with a 500K-token context window - same token rates as Grok 4.6 with cheaper cache reads.

3,716/11,148credits
input / output ยท per 1M tokens
Optimized for coding workloads
500K 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

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

Model Specifications

Context Window
500K
tokens
Max Output
33K
tokens
Training Cutoff
2025-11
Compatible SDK
OpenAI

Capabilities

Vision
Function Calling
Streaming
JSON Mode
System Prompt

Token Pricing (per 1M tokens)

Token TypeCreditsUSD Equivalent
Input Tokens3,716$2.48
Output Tokens11,148$7.43
Cached Tokens557.4$0.37

* 1,500 credits โ‰ˆ $1 (actual charges may vary based on usage)

Quick Start

curl -X POST "https://api.core.today/llm/grok/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "grok-4.5",
  "messages": [
    {
      "role": "user",
      "content": "Summarize the attached report in 5 bullets."
    }
  ],
  "max_tokens": 1024
}'

Parameters

ParameterTypeRequiredDefaultDescription
modelstringYes-Model ID, e.g. "grok-4.5".
messagesarrayYes-Chat messages in OpenAI format (system/user/assistant roles).
temperaturenumberNo0.7Sampling temperature (0-2).
max_tokensintegerNo2048Maximum completion tokens.
streambooleanNofalseStream the response as server-sent events.

Examples

Chat completion

OpenAI-compatible chat completion request

curl -X POST "https://api.core.today/llm/grok/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "grok-4.5",
  "messages": [
    {
      "role": "user",
      "content": "Summarize the attached report in 5 bullets."
    }
  ],
  "max_tokens": 1024
}'

Tips & Best Practices

1Works with the OpenAI SDK - set base_url to https://ai.api.core.today/llm/grok/v1
2Keep prompts under 200K tokens to stay on the standard rate (2x above that)
3Cache reads are billed at a discounted rate - reuse long system prompts

Use Cases

Long-document analysis and summarization
Coding assistants and agents
Multi-turn chat with large shared context