Grok 4.20 (Reasoning)

Model details

Grok 4.20 (Reasoning)

Model
grok-4.20-0309-reasoning
Provider
xai
API
openai-completions
Base URL
https://api.x.ai/v1
Input
text, image
Reasoning
Yes
Context window
2,000,000
Max tokens
30,000
Cost / million input
$2
Cost / million output
$6
Cost / million cache read
$0.2
Cost / million cache write
$0
Model config JSON
{
  "providers": {
    "xai": {
      "apiKey": "YOUR_API_KEY",
      "models": [
        {
          "id": "grok-4.20-0309-reasoning",
          "name": "Grok 4.20 (Reasoning)",
          "reasoning": true,
          "input": [
            "text",
            "image"
          ],
          "contextWindow": 2000000,
          "maxTokens": 30000,
          "cost": {
            "input": 2,
            "output": 6,
            "cacheRead": 0.2,
            "cacheWrite": 0
          }
        }
      ],
      "api": "openai-completions",
      "baseUrl": "https://api.x.ai/v1"
    }
  }
}