Models / xAI
xAI

Grok 4.20

x-ai/grok-4.20

Grok 4.20 is a reasoning model from xAI with industry-leading speed and agentic tool calling capabilities. It combines the lowest hallucination rate on the market with strict prompt adherance, delivering...

Input
$1.625 / 1M tokens
Output
$3.25 / 1M tokens
Context
2000K tokens

Capabilities

✓ Streaming✓ Tool / function calling✓ JSON / structured output✓ Vision (image input)

Call this model

Pass x-ai/grok-4.20 as the model. Change only the base URL from your existing OpenAI SDK setup.

quickstart.sh
curl https://modeldatabase.com/v1/chat/completions \
  -H "Authorization: Bearer $MDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "x-ai/grok-4.20",
    "messages": [{"role":"user","content":"Hello!"}]
  }'

Prices are final — the routing margin is already included. See the full pricing table or the API docs.