xAI
延迟—
吞吐量—
上传速率—
上下文长度—
最大输出—
上传价格—每百万
输出价格—每百万
缓存读取—每百万
缓存写入—每百万
/xai/grok-4-2
Grok-4.2: A trillion-parameter AI productivity behemoth featuring native 16-Agent cluster collaboration. It processes real-time data streams and evolves via high-frequency weekly updates. It is the ultimate API for commercial automation, complex enterprise decision-making, and personalized cognitive augmentation.
curl ${API_BASE_URL}/v1/chat/completions \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4-2",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'将 <YOUR_API_KEY> 替换为你在令牌管理页面生成的 API Key。
所有请求必须携带 Authorization: Bearer <TOKEN> 请求头。
RPM = 每分钟请求数,TPM = 每分钟 Token 数,RPD = 每天请求数。限制按令牌分组生效。