xAI: grok-4.20API pricing
grok-4.20 is a language model from xAI. It reads and writes text.
- 每100万枚代币的价格
- $1.25 / $2.50input / output
- 缓存的输入
- 0.20美元每100万枚代币
- 上下文
- 2M tokens1.8M max output
- 服务提供商
- 3
- 最快
- 80 tok/sxAI
服务提供商
3 providers ·
2M context · 131K max output
支持的参数12
- 抽样
温度top_p种子logit_bias- 处罚
存在惩罚- 输出
停止response_format结构化输出- 工具
工具工具选择- 推理
推理include_reasoning
- Route 12M context · 1.8M max outputCache $0.21 · 0.69 s · 80 tok/s · 100 %0.69 s · 80 tok/sInput $1.31Cache read $0.21Output $2.63Latency 0.69 sSpeed 80 tok/sUptime 100 %$1.31 in$2.63 out
- Route 22M context · 1.8M max outputCache $0.21 · 0.55 s · 88 tok/s · 100 %0.55 s · 88 tok/sInput $1.31Cache read $0.21Output $2.63Latency 0.55 sSpeed 88 tok/sUptime 100 %$1.31 in$2.63 out
- Route 32M context · 1.8M max outputCache $0.42Input $2.63Cache read $0.42Output $5.25Latency —Speed —Uptime —$2.63 in$5.25 out
- Route 42M context · 1.8M max outputCache $0.42 · 0.74 s · 98 tok/s · 100 %0.74 s · 98 tok/sInput $2.63Cache read $0.42Output $5.25Latency 0.74 sSpeed 98 tok/sUptime 100 %$2.63 in$5.25 out
支持的参数11
- 抽样
温度top_p种子- 输出
response_format结构化输出logprobstop_logprobs- 工具
工具工具选择- 推理
推理include_reasoning- 未确认
停止
- 1 more provider through partner hosts · from $1.31 in · $2.62 out
价格走势
API
curl https://api.opencheap.si/v1/chat/completions \
-H "Authorization: Bearer $OPENCHEAP_API_KEY" -H "Content-Type: application/json" \
-d '{ "model": "opencheap/grok-4.20", "messages": [{ "role": "user", "content": "Hi" }] }'import os
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheap.si/v1", api_key=os.environ["OPENCHEAP_API_KEY"])
r = client.chat.completions.create(model="opencheap/grok-4.20",
messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.opencheap.si/v1", apiKey: process.env.OPENCHEAP_API_KEY });
const r = await client.chat.completions.create({ model: "opencheap/grok-4.20",
messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);致电 grok-4.20 使用 OpenAI SDK:将其指向 https://api.opencheap.si/v1 并传递模型 ID opencheap/grok-4.20;其余代码保持不变。
About grok-4.20
- 标价
- $1.25 / $2.50in / out per 1M
- 请求示例
- $0.01510,000 in + 1,000 out
- 端点
https://api.opencheap.si/v1- 模型 ID
每个请求都会发送给模型中成本最低且状态正常的提供者,而每个响应都会报告其成本为 使用成本. Every model on OpenCheap is called with one key at the same OpenAI-compatible endpoint, https://api.opencheap.si/v1.
用文字表述价格
grok-4.20 costs from $1.25 per 1M input tokens and $2.50 per 1M output tokens on OpenCheap, with cached input at $0.20 per 1M tokens. Its list price is $1.25 per 1M input tokens and $2.50 per 1M output tokens, the same as here. At that price, a request with 10,000 input tokens and 1,000 output tokens costs about $0.015, and 1,000 such requests about $15.00.
3 providers serve grok-4.20 on OpenCheap. Its context window is 2M tokens (2,000,000), room for roughly 1,500,000 words of English in one request.
grok-4.20 is one of 24 xAI models on OpenCheap.
The public list price is $1.25 per 1M input tokens and $2.50 per 1M output tokens. OpenCheap is from $1.25 and $2.50, as of 2026-12-04 11:34 UTC.
Prices as of 2026-12-04 11:34 UTC.
关于定价的问题
How much does the grok-4.20 API cost per 1M tokens?
grok-4.20 costs from $1.25 per 1M input tokens and $2.50 per 1M output tokens on OpenCheap, with cached input at $0.20 per 1M tokens. Prices as of 2026-12-04 11:34 UTC.
What does one grok-4.20 request cost?
A request with 10,000 input tokens and 1,000 output tokens costs about $0.015, and 1,000 such requests about $15.00. Every answer reports its own cost in usage.cost.
Is grok-4.20 cheaper on OpenCheap than its list price?
Its list price is $1.25 per 1M input tokens and $2.50 per 1M output tokens, the same as here.
Which providers serve grok-4.20?
3 providers serve grok-4.20 on OpenCheap. Each request goes to the cheapest healthy provider of the model; the table on this page lists every provider with its price, speed and uptime.
What is the context window of grok-4.20?
Its context window is 2M tokens (2,000,000), room for roughly 1,500,000 words of English in one request.
How do I call the grok-4.20 API?
Point the OpenAI SDK at https://api.opencheap.si/v1 and pass the model id opencheap/grok-4.20. One OpenCheap key works for every model; the rest of your code stays the same.
More from xAI
- Grok 4.7grok-4.7$1.26 / $5.03 per 1M · 500K context
- Grok 2 Vision 1212grok-2-vision-1212每1M 1.80美元 / 9.00美元
- Grok 4grok-4$3.30 / $16.50 per 1M · 256K context
- Grok 4.1 Fastgrok-4.1-fast-non-reasoning$0.20 / $0.50 per 1M · 1M context
- Grok 4.1 Fast (reasoning)grok-4.1-fast-reasoning$0.20 / $0.50 per 1M · 1M context
- grok-4.20-0309-non-reasoninggrok-4.20-0309-non-reasoning$1.31 / $2.62 per 1M · 200K context
- grok-4.20-0309-reasoninggrok-4.20-0309-reasoning$1.31 / $2.62 per 1M · 200K context
- Grok 4.20 Betagrok-4.20-beta$0.26 / $1.05 per 1M · 2M context
类似型号
- Kimi K3.1 ProMoonshot · 1M context$0.35 / $1.74 per 1M36 % cheaper
- Ergo 1.0Other labs · 1M context$0.94 / $2.83 per 1M
- Step 5StepFun · 1M context$0.94 / $2.54 per 1M
- GPT 5.6 SolOpenAI · 100万上下文$0.50 / $3.00 per 1M
- GLM 5.4Zhipu · 1M context$0.70 / $2.20 per 1M17 % cheaper
- 基米 K3Moonshot · 1M context$1.57 / $0.94 per 1M50 % cheaper