x-aiVision

xAI: 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...

Context
2M tokens
Input / 1M tokens
$1.25
Output / 1M tokens
$2.50
Benchmark

Pricing

Input tokens$1.25 per 1M tokens
Output tokens$2.50 per 1M tokens
Cache read$0.20 per 1M tokens

Technical details

Model IDx-ai/grok-4.20
Context window2M tokens
Input modalitiestext, image, file, pdf
Output modalitiestext
TokenizerGrok

Use with MegaBrain

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

const response = await client.chat.completions.create({
  model: 'x-ai/grok-4.20',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use xAI: Grok 4.20?

Get an API key and start making requests in minutes.

Get an API key