← models

xAI

Grok models — fast inference with large 2M context and low hallucination

Website·Docs·Pricing·Sign Up

API Configuration

API Typeopenai-completions
Base URLhttps://api.x.ai/v1
Auth Modeapi_key
Auth Keys
XAI_API_KEYAPI Key — obtain from https://console.x.ai/
Regionsus
Default Modelgrok-4.20-beta-0309-reasoning
Statusactive

Pricing

Pay-as-you-go per token. Free tier available with rate limits. See docs.x.ai/docs/models for pricing.

Getting Started

Sign up at console.x.ai, add a payment method, then create an API key.

Models (4)

ModelContextMax OutputPricingFeatures
Grok 4.20 Beta (Reasoning)
grok-4.20-0309-reasoning
xAI's newest flagship model with reasoning, 2M context, image understanding
2.0M131KInput $2/M, output $6/M.(preview)
Grok 4.20 Beta (Non-Reasoning)
grok-4.20-0309-non-reasoning
xAI's newest flagship model without reasoning, 2M context, functions and structured outputs
2.0M131KInput $2/M, output $6/M.(preview)
Grok 4-1 Fast (Reasoning)
grok-4-1-fast-reasoning
Fast and affordable Grok model with reasoning, 2M context
2.0M131KInput $0.20/M, output $0.50/M.
Grok 4-1 Fast (Non-Reasoning)
grok-4-1-fast-non-reasoning
Fast and affordable Grok model without reasoning, 2M context
2.0M131KInput $0.20/M, output $0.50/M.

Last verified: 2026-03-19