x-ai/grok-4.20
2,000,000 context · $2.00/M input tokens · $6.00/M output tokens
Grok 4.20 is xAI's newest flagship model with industry-leading speed and agentic tool calling capabilities. It combines the lowest hallucination rate on the market with strict prompt adherance, delivering consistently...
Pay-per-use
No upfront costs, pay only for what you use
Use the following code examples to integrate with our API:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://llm.wavespeed.ai/v1"
)
response = client.chat.completions.create(
model="x-ai/grok-4.20",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)x-ai/grok-4.20
Grok 4.20 is xAI's newest flagship model with industry-leading speed and agentic tool calling capabilities. It combines the lowest hallucination rate on the market with strict prompt adherance, delivering consistently...
Input
$2 /M
Output
$6 /M
Context
2000K
Vision
Supported
Tool Use
Supported
Access Grok 4.20 through our unified API — OpenAI-compatible, no cold starts, transparent pricing.
Pricing on WaveSpeedAI: $2.00 per million input tokens and $6.00 per million output tokens. Prompt caching and batch processing are billed separately and reduce effective cost on long, repetitive workloads.
Grok 4.20 supports up to 2000K tokens of context with up to — tokens of output per request.
Yes. WaveSpeedAI exposes Grok 4.20 through an OpenAI-compatible endpoint at https://llm.wavespeed.ai/v1. Point the official OpenAI SDK at this base URL with your WaveSpeedAI API key — no other code changes required.
Sign in to WaveSpeedAI, create an API key in Access Keys, then send a request to https://llm.wavespeed.ai/v1/chat/completions with model id set to the value shown above. New accounts receive free credits to evaluate Grok 4.20 before paying per token.