Skip to content
OpenKey

Grok 4.20

xAIReleased Mar 31, 2026

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

Try in playground
Context window
2M tokens
Input
text, image, file
Output
text
Tokenizer
Grok
Knowledge cutoff
Sep 1, 2025
Released
Mar 31, 2026
Reasoning
optional

Pricing

Per 1M tokens. The provider price and our flat 3% fee are separate columns — what you pay is their sum.

Per 1M tokensProvider+ 3% feeYou pay
Input$1.25$0.037$1.29
Output$2.50$0.075$2.58
Cache read$0.200$0.0060$0.206

Supported parameters

  • include_reasoning
  • logprobs
  • max_tokens
  • reasoning
  • response_format
  • seed
  • structured_outputs
  • temperature
  • tool_choice
  • tools
  • top_logprobs
  • top_p

Call it

OpenAI-compatible: point your SDK at api.openkey.ai/v1 and use model x-ai/grok-4.20.

Code sample language
curl https://api.openkey.ai/v1/chat/completions \
  -H "Authorization: Bearer $OPENKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "x-ai/grok-4.20",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openkey.ai/v1",
    api_key=os.environ["OPENKEY_API_KEY"],
)

completion = client.chat.completions.create(
    model="x-ai/grok-4.20",
    messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.openkey.ai/v1",
  apiKey: process.env.OPENKEY_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "x-ai/grok-4.20",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Questions

How much does Grok 4.20 cost via API?
Through OpenKey, Grok 4.20 costs $1.29 per 1M input tokens and $2.58 per 1M output tokens. That is the provider price ($1.25 / $2.50) plus a flat 3% fee — nothing else.
What is Grok 4.20's context window?
Grok 4.20 accepts up to 2M tokens of context.
Is Grok 4.20 OpenAI-compatible?
Yes. Send requests to OpenKey's /v1/chat/completions endpoint with model "x-ai/grok-4.20" using any OpenAI SDK — only the base URL and API key change.
What inputs does Grok 4.20 support?
Grok 4.20 accepts text, image, file input and produces text output. Its knowledge cutoff is Sep 1, 2025.

More from xAI

All xAI models →