Grok 4.7 · configuration
OpenRouter 模型页把 x-ai/grok-4.7 标成 SpaceXAI 的 Grok 4.7,列出的输入 / 输出价格是每百万 token $1.60 / $4.80,并给出了 OpenRouter SDK 与 cURL 的调用示例;请求体里的推理档位字段和 Low、Medium、High 各档标价在本次采集中未读到。
调用 Grok 4.7 时固定 {{MODEL_ID}}、{{REASONING_EFFORT}} 和 {{API_BASE}}。任务是 {{TASK}},只使用 {{TOOL_ALLOWLIST}},并用 {{ACCEPTANCE}} 验收。
运行前替换每个变量,并把实际取值写进验收记录。运行前仍需替换: {{MODEL_ID}}, {{REASONING_EFFORT}}, {{API_BASE}}, {{TASK}}, {{TOOL_ALLOWLIST}}, {{ACCEPTANCE}}
调用 Grok 4.7 时固定 {{MODEL_ID}}、{{REASONING_EFFORT}} 和 {{API_BASE}}。任务是 {{TASK}},只使用 {{TOOL_ALLOWLIST}},并用 {{ACCEPTANCE}} 验收。
OpenRouter 模型页把 x-ai/grok-4.7 标成 SpaceXAI 的 Grok 4.7,列出的输入 / 输出价格是每百万 token $1.60 / $4.80,并给出了 OpenRouter SDK 与 cURL 的调用示例;请求体里的推理档位字段和 Low、Medium、High 各档标价在本次采集中未读到。
适合的任务:页面把该模型写成面向 coding、agentic tasks 与 knowledge work 的旗舰模型,并写它在长时间软件工程、自行核对工作、长上下文,以及起草文档和演示文稿方面强于前代 Grok 4.6。
不适合的任务:未注明
适用的模型版本:页面标题为 SpaceXAI: Grok 4.7,API 模型 ID 为 x-ai/grok-4.7。本文只记录这一页上的该 ID。
适用的客户端、Agent 或 API:页面 Quick Start 写明 OpenRouter API 与 OpenAI 兼容,并展示 OpenRouter SDK 与 POST https://openrouter.ai/api/v1/chat/completions。同一页还列出 POST https://openrouter.ai/api/v1/responses 与 POST https://openrouter.ai/api/v1/messages。页面 Apps 区在采集时列出的公开流量来源包括 pi、Hermes Agent、Claude Code、Codex、omp。
推荐的推理档位和参数:Quick Start 示例没有设置推理档位。参数表里 reasoning 的默认值是 —;写明的默认值是 temperature 0.7、top_p 0.95。页面说明用 reasoning 参数打开推理,并在响应里读取 reasoning_details;继续对话时保留完整的 reasoning_details。reasoning 的具体字段名未注明。Providers 筛选可见的档位名称是 All、Low、Medium、High、Extra high。选中 Extra high 后,地址栏查询参数为 reasoningEffort=xhigh。Low、Medium、High 的查询参数值未注明。页面写 SpaceXAI 报告的基准使用 xhigh reasoning effort;这是基准说明,不是请求示例中的参数。
下面是该页 Quick Start 中已经可见的接入配置,不是一份完整提示词。API Key 只使用页面给出的占位符。
设置环境变量:
export OPENROUTER_API_KEY=sk-or-v1-...OpenRouter TypeScript SDK 示例。页面说明要流式读取,才能在最终 chunk 的 usage 里看到 reasoning tokens:
import { OpenRouter } from "@openrouter/sdk";
const openrouter = new OpenRouter({
apiKey: "<OPENROUTER_API_KEY>"
});
// Stream the response to get reasoning tokens in usage
const stream = await openrouter.chat.send({
chatRequest: {
model: "x-ai/grok-4.7",
messages: [
{
role: "user",
content: "How many r's are in the word 'strawberry'?"
}
],
stream: true
}
});
let response = "";
for await (const chunk of stream) {
const content = chunk.choices[0]?.delta?.content;
if (content) {
response += content;
process.stdout.write(content);
}
// Usage information comes in the final chunk
if (chunk.usage) {
console.log("\nReasoning tokens:", chunk.usage.completionTokensDetails?.reasoningTokens);
}
}同一页 Enable streaming 中的 cURL:
curl -N https://openrouter.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{
"model": "x-ai/grok-4.7",
"stream": true,
"messages": [
{"role": "user", "content": "Hello"}
]
}'页面上的 Get Code 代码块还有一段带图片输入的 OpenRouter SDK 调用。Python、TypeScript (fetch)、Python (OpenAI)、TypeScript (OpenAI),以及 Get Code 里除下面这段之外的语言样本,本次没有打开,内容未注明。
import { OpenRouter } from "@openrouter/sdk";
const openrouter = new OpenRouter({
apiKey: "<OPENROUTER_API_KEY>"
});
const response = await openrouter.chat.send({
model: "x-ai/grok-4.7",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://live.staticflickr.com/3851/14825276609_098cac593d_b.jpg"
}
}
]
}
]
});
console.log(response.choices[0].message.content);Chat Completions 端点写明:
POST https://openrouter.ai/api/v1/chat/completions
Authorization: Bearer $OPENROUTER_API_KEY
Content-Type: application/json
HTTP-Referer:optional — your site URL, for rankings
X-Title:optional — your site name, for rankings
Model:x-ai/grok-4.7
参数表上读到的名称、类型和默认值:
| Name | Type | Default | Description |
|---|---|---|---|
reasoning | map | — | Controls reasoning behavior for models that support thinking tokens, including whether reasoning is enabled, the reasoning effort, maximum reasoning tokens, and whether reasoning is excluded from the response. |
response_format | map | — | Forces the model to produce specific output format. |
max_tokens | integer | — | This sets the upper limit for the number of tokens the model can generate in response. |
temperature | float | 0.7 | This setting influences the variety in the model's responses. |
top_p | float | 0.95 | This setting limits the model's choices to a percentage of likely tokens: only the top tokens whose probabilities add up to P. |
seed | integer | — | If specified, the inferencing will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. |
logprobs | boolean | — | Whether to return log probabilities of the output tokens or not. |
top_logprobs | integer | — | An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. |
tools | array | — | Tool calling parameter, following OpenAI's tool calling request shape. |
tool_choice | string or object | — | Controls which (if any) tool is called by the model. |
在 OpenRouter dashboard 创建 API key,并按页面示例设为环境变量 OPENROUTER_API_KEY。
请求模型使用 x-ai/grok-4.7。Chat Completions 地址是 https://openrouter.ai/api/v1/chat/completions。
需要边收边看时,按页面示例加入 "stream": true。流式 SDK 示例在最后一个 chunk 的 chunk.usage.completionTokensDetails.reasoningTokens 读取 reasoning tokens。
页面要求用 reasoning 打开推理,从响应的 reasoning_details 读取思考过程;多轮继续时把完整 reasoning_details 随消息传回。请求 JSON 的具体写法未注明。
FAQ 写明该模型接受 tools 和 tool_choice,并通过 response_format 里的 JSON schema 做结构化输出。schema 示例未注明。
页面标题是 “Grok 4.7 - API Pricing & Benchmarks | OpenRouter”,主标题是 “SpaceXAI: Grok 4.7”,模型 ID 是 x-ai/grok-4.7。
展开后的模型说明原文:
Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particul… 以上为必要节选,完整内容请查看原文。
页头标价与规格:输入 / 输出 $1.60 / $4.80 per 1M,上下文 500K,发布 Sep 21, 2026。
FAQ 原文中的价格与能力:
Grok 4.7 costs $1.60/M input tokens and $4.80/M output tokens, with separate rates for Cache Read at $0.40/M tokens and Web Search at $5.00/1K calls.
Grok 4.7 has a 500,000 token context window.
Yes. Grok 4.7 accepts tools and tool_choice for function calling. It also supports structured outputs via a JSON schema in response_format.
Grok 4.7 accepts text, images, and files such as PDFs as input and returns text.
Grok 4.7 was released on September 21, 2026.
默认 Reasoning effort 为 All 时,Providers 表读到的标价。延迟、吞吐和 uptime 是当时的实时数:
| 提供方 | 隐私标记 | Input /M | Output /M | Cache read /M | Latency | Throughput | Uptime |
|---|---|---|---|---|---|---|---|
| SpaceXAI | Privacy: Private | $1.60 | $4.80 | $0.40 | 1.41s | 58 tps | 94.97% |
| SpaceXAI | Privacy: Logs | $1.60 | $4.80 | $0.40 | 1.16s | 65 tps | 94.97% |
| SpaceXAI Priority | Privacy: Private | $3.20 | $9.60 | $0.80 | 1.60s | 51 tps | 100.00% |
| SpaceXAI Priority | Privacy: Logs | $3.20 | $9.60 | $0.80 | -- | -- | -- |
Priority 两行位于 “Not used in Standard routing” 之下。路由说明写的是 Balanced (price + speed)、Nitro (fastest)、Floor (cheapest)、Exacto (highest tool-calling accuracy)。这些模式各自的标价未注明。
选中 Extra high 后,地址为 https://openrouter.ai/x-ai/grok-4.7?reasoningEffort=xhigh。该次读到的标价仍是标准端点 $1.60 / $4.80 / $0.40,Priority 端点 $3.20 / $9.60 / $0.80。这一屏没有重新读到 Private / Logs 对应关系,所以隐私标记未注明。当时的延迟快照是:
| 提供方 | Input /M | Output /M | Cache read /M | Latency | Throughput | Uptime |
|---|---|---|---|---|---|---|
| SpaceXAI | $1.60 | $4.80 | $0.40 | 1.22s | 58 tps | 94.97% |
| SpaceXAI | $1.60 | $4.80 | $0.40 | 1.46s | 63 tps | 94.97% |
| SpaceXAI Priority | $3.20 | $9.60 | $0.80 | -- | -- | 100.00% |
| SpaceXAI Priority | $3.20 | $9.60 | $0.80 | 1.51s | 32 tps | -- |
Low、Medium、High 各档的 Input、Output、Cache read、延迟、吞吐和 uptime 均未注明。
Pricing 区最后一次完整读到的实时有效价格:
Weighted Avg Input Price:$0.7196 /M tokens
Weighted Avg Output Price:$6.002 /M tokens
SpaceXAI:Effective in $0.687,Effective out $6.27,Cache hit rate 83.3%,Token share 1d 45.2%
SpaceXAI:Effective in $0.747,Effective out $5.90,Cache hit rate 81.8%,Token share 1d 54.8%
SpaceXAI Priority:Effective in $0.610,Effective out $0.00,Cache hit rate 83.3%,Token share 1d 0.0%
SpaceXAI Priority:Effective in $0.734,Effective out $4.45,Cache hit rate 81.5%,Token share 1d 0.1%
这四行有效价格没有和 Private / Logs 重新配对,对应关系未注明。页面写明缓存和折扣会使实付价格低于标价。采集过程中这组有效价格有变动,上表只保留最后一次完整读数。
Performance 区第一次整页读到的 P50 / 近 3 天快照:
Throughput:65 tok/s,P50, best across providers
Latency:1.14s,P50, best provider
Throughput 均值:SpaceXAI 61 tok/s,SpaceXAI (ZDR) 59 tok/s,SpaceXAI (Priority) 56 tok/s
Latency 均值:SpaceXAI 1.21 s,SpaceXAI (Priority) 1.36 s,SpaceXAI (ZDR) 1.39 s
E2E Latency 均值:SpaceXAI (Priority, ZDR) 6.12 s,SpaceXAI (ZDR) 7.52 s,SpaceXAI (Priority) 8.34 s
Tool Call Error Rate 均值:SpaceXAI (Priority, ZDR) 0.00 %,SpaceXAI (Priority) 0.00 %,SpaceXAI (ZDR) 0.14 %
Structured Output Error Rate 均值:SpaceXAI (Priority, ZDR) 0.00 %,SpaceXAI (ZDR) 2.44 %,SpaceXAI 5.13 %
Cache Hit Rate 均值:SpaceXAI 81.85 %,SpaceXAI (ZDR) 81.56 %,SpaceXAI (Priority, ZDR) 80.28 %
Uptime (3d):100.00%
Availability (3d):97.06%,时间窗为 Sep 19, 11 AM - Sep 22, 11 AM
近 24 小时图上的 OpenRouter Availability:97.17%
ZDR 与 “Privacy: Private” 是否为同一端点,页面这次没有写成同一标签,对应关系未注明。
Activity 第一次读到的 token 量:Prompt 5.16B,Reasoning 81.9M,Completion 34.9M。Apps 区当时的公开流量:pi 957M tokens,Hermes Agent 940M tokens,Claude Code 614M tokens,Codex 594M tokens,omp 552M tokens。
Benchmarks 表注明来源为 Artificial Analysis,名称都带 Grok 4.7 (xhigh):
| Benchmark | Score |
|---|---|
| Intelligence Index | 46.4 |
| HLE | 43.1% |
| AA-LCR | 76.7% |
| GDPval-AA | 59.8% |
| CritPt | 17.7% |
| SciCode | 57.4% |
| AA-Omniscience Accuracy | 47.4% |
| AA-Omniscience Non-Hallucination Rate | 70.7% |
页面还写 Intelligence Index “Better than 92% of models compared”。这些分数是页面转载的 Artificial Analysis 指标,页面写明 SpaceXAI 报告的基准使用 xhigh。
标价、缓存价和 Web Search 价来自这一张 OpenRouter 模型页。Low、Medium、High 的分档价格没有读到,不能从 All 或 Extra high 的标价外推。
Extra high 只确认了查询参数 reasoningEffort=xhigh 以及该次屏幕上的标价。请求体里如何写 Low、Medium、High、Extra high 或 xhigh,未注明。
temperature 0.7 和 top_p 0.95 是参数表上的默认值。Quick Start 示例没有传入这两个字段,也没有传入 reasoning。
有效价格、延迟、吞吐、uptime、token 量和 App 流量是 2026-09-22 的页面快照,刷新后会变。
基准分数按页面所写属于 Artificial Analysis,且对应 xhigh。不能把它写成 OpenRouter 自己的全任务评测,也不能写成其他推理档位的分数。
FAQ 写明输入是 text、images、files such as PDFs,输出是 text。其他模态未注明。
本文没有打开 xAI 文档,也不把其他 Grok 型号的参数算进 x-ai/grok-4.7。
打开 https://openrouter.ai/x-ai/grok-4.7 。本次采集日是 2026-09-22。
页头可读模型 ID、$1.60 / $4.80、500K 和 Sep 21, 2026。展开 Show more 后可读完整模型说明。展开 FAQ 后可读缓存价 $0.40/M 与 Web Search $5.00/1K。
宽屏下 Quick Start 所在的 #api 区域带有大屏隐藏样式。把视口缩到约 820px 宽后,该区域可见,并能读到 TypeScript SDK、cURL 和参数表。
Providers 默认筛选是 Standard、Reasoning effort All、Latency / throughput P50。All 这一屏的标价和隐私标记已经读到。Extra high 已读到,地址含 reasoningEffort=xhigh。不要用未打开的 Low、Medium、High 筛选补数;这三档标价保持未注明。
OpenRouter · 原文日期: 2026-09-21 · 编辑日期: 2026-09-22
阅读原始来源Grok 4.7
请在上方所列环境中运行本指南。下载不会自动传入模板,也不代表账户已开放该模型。