xAI Text Available

xAI Grok 4.7 API

Grok 4.7 是 xAI 面向编程、Agent 与知识工作的旗舰模型,采用更大的基础模型与更长强化学习训练,强化长任务规划、自我验证、长上下文管理以及文档与演示创作。支持文本与图像输入、文本输出、500K Token 上下文、low/medium/high/xhigh 四档推理(默认 high)、函数调用、结构化输出、流式响应、提示缓存,以及 Web 搜索、X 搜索和代码执行;知识截止时间为 2026 年 5 月。官方评测包括 CursorBench 4.0 46.3%、DeepSWE v1.1 71.0%(high)、EEBench 64.0% 和 Terminal-Bench 4.0 38.0%。

Starting price 按实际 Token 用量计费 · Price snapshot

Waiting to refresh live prices…

Get started Developer guide

Model pricing

Compare all public tiers and current prices for this series on one page.

Input

按实际 Token 用量计费

Output

总价 = 各类 Token 用量 × 对应单价

Context

500,000

Max output

—

Model ID
grok-4.7
Billing model
Fixed combination billing
Available groups
default, svip
Capabilities
chat, responses-native, structured-outputs
Combination pricing rules
按实际 Token 用量计费总价 = 各类 Token 用量 × 对应单价
  • Token 单价由当前计费表达式推导;实际费用按请求用量结算
查看高级计费表达式v2:len < 200000 ? tier("xai_grok_4_7_short_official_usd_2026_09_22", tokens(p, 2) + tokens(c, 6) + tokens(cr, 0.5) + calls(tool("web_search"), 5) + calls(tool("code_execution"), 5)) : tier("xai_grok_4_7_long_ge_200k_official_usd_2026_09_22", tokens(p, 4) + tokens(c, 12) + tokens(cr, 1) + calls(tool("web_search"), 5) + calls(tool("code_execution"), 5))

API reference

Base URL is https://api.rokoapi.com/v1. The model in requests must use the model IDs listed above.

curl https://api.rokoapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.7",
    "messages": [{"role":"user","content":"Introduce yourself in one sentence"}]
  }'

For more parameters, limits, and async task queries, read the xAI Grok 4.7 developer guide. xAI Grok 4.7 Developer guide · OpenAI · Authorization

Other xAI model series