官方更新 AWS ML Blog Mon, 28 Sep 2026 正文 ok 2225 words

Grok 4.7 现已登陆 Amazon Bedrock

英文标题:Grok 4.7 is now available on Amazon Bedrock

xAI 的 Grok 4.7 已在 Amazon Bedrock 上推出,面向编程、长时间运行的 Agent 和知识工作,提供 50 万 token 上下文窗口及四档可配置推理强度。该模型可通过跨区域推理配置文件调用,兼容 Responses、Chat Completions、Converse 和 InvokeModel API。xAI 称其在复杂任务中的持续执行、自我验证、文档生成及专业知识工作方面有所增强;第三方 Artificial Analysis 的评测也显示其长程 Agent 与编程能力提升,但单项任务的输出 token 消耗约翻倍。开发者可通过 OpenAI SDK 或 AWS SDK 接入,并结合 Bedrock 的提示词缓存、Guardrails、结构化输出、调用日志及服务层级控制成本、延迟和合规性。
打开原文相关 6.3 · 机会 2
media1.3 MB media101.1 KB media124.1 KB media345.0 KB media141.2 KB media346.5 KB media28.1 KB media21.5 KB media21.3 KB media13.9 KB media73.8 KB media125.1 KB

中文

xAI 的 Grok 4.7 现已在 Amazon Bedrock 上提供,为 Bedrock 模型目录新增了一款面向编程、长时间运行的 Agent 和知识工作的前沿模型。它提供 50 万 token 的上下文窗口,并支持四档可配置的推理强度:low、medium、high 和 xhigh。

Grok 4.7 通过跨区域推理配置文件在 bedrock-runtime 端点上提供服务,支持 Responses、Chat Completions 和 Converse API。xAI 表示,这是其能力最强的编程与知识工作模型:它能在困难任务上工作更长时间,并在继续推进前更仔细地验证自身输出。

本文将介绍 xAI 所称的 Grok 4.7 设计用途、它在 Amazon Bedrock 上的封装方式,以及如何发送第一个请求。

Grok 4.7 的设计目标

本节的能力与训练细节来自 xAI 于 2026 年 9 月 21 日发布的公告 Introducing Grok 4.7,以及 Grok 4.7 模型文档。

xAI 将 Grok 4.7 定位为其能力最强的编程和知识工作模型。其重点并非单纯的原始速度,而是持续执行能力:模型能够在困难任务上工作更久,并在继续之前更认真地检查自己的工作。

在训练方面,xAI 称 Grok 4.7 使用了一个全新且规模更大的基础模型。它在难度更高的混合任务上进行了更长时间的强化学习训练,并有意提高了那些需耗费数小时完成的问题的权重。由此带来了两项能力:模型更善于验证自身工作,也能在长任务中更有效地利用其 50 万 token 上下文窗口。xAI 还训练该模型原生理解 Grok Bot 工具框架,并将其在对话任务和通用知识工作方面的改进归功于此。

对于构建 Agent 的人员而言,值得关注的是自我验证行为。在继续执行前检查自身输出的模型,在长轨迹任务中通常更不容易发生灾难性失败;否则,早期错误会在后续每一个步骤中不断累积。

xAI 还特别提到更强的文档和演示文稿生成能力,并表示该模型在律师、护士和金融分析师等专业人士从事的知识工作上有所提升。xAI 报告称,其公开评测的各项结果均有提升。这些评测包括:通过 CursorBench 和 DeepSWE 衡量的软件工程能力;通过 Terminal-Bench 和 AA Briefcase 衡量的多小时终端及办公任务能力;通过 EEBench 衡量的电气工程能力;通过 Harvey Legal Agent Benchmark 衡量的法律工作能力;以及通过 HealthBench Professional 衡量的临床推理能力。有关具体结果,请参阅 xAI 的公告。

独立评测

Artificial Analysis 运行自己的评测,而非依赖开发商自行报告的数据,因此可作为 xAI 公开结果之外一项有价值的第二参考来源。

根据 Artificial Analysis,Grok 4.7 在其整套评测中均有提升。最大的提升出现在长周期 Agent 知识工作,以及在 xAI 自有工具框架中运行的编程 Agent。Intelligence Index 是一项综合指标,基于多项独立评测构建,涵盖 Agent 工具使用、推理与知识、知识可靠性和长上下文任务。

指标(Artificial Analysis) Grok 4.7 Grok 4.6
Intelligence Index 46 44
Coding Agent Index 56 47
AA-Briefcase,长周期知识工作(Elo) 1,657 1,546
GDPval-AA,专业工作成果(Elo) 1,695 1,605
AA-Omniscience Index 32 30
AA-Omniscience 幻觉率 29% 34%
每个 Intelligence Index 任务的输出 token 数 ~81k ~38k

Grok 4.7 的测量使用 xhigh 推理强度;Grok 4.6 则使用 Artificial Analysis 为各项指标报告的推理强度。最后一行体现了需要规划的权衡:能力提升伴随着每项任务的输出 token 数约增至两倍。因此,应有意识地设置推理强度,而不是沿用默认值。

安全与网络安全

xAI 表示,Grok 4.7 采用了一套完全新的安全防护栈,是其测试过的在拒绝不当请求和抵御越狱攻击方面表现最强的模型。对于网络安全和生物工作等双用途领域,xAI 将目标表述为同时实现两点:既对合法任务保持有用,又拒绝危险任务。

针对网络安全,xAI 称该模型只会放行极少部分高风险双用途提示,同时很少阻断合法的安全工作。xAI 还已开始向经筛选的网络安全合作伙伴提供仅限受邀访问的 Grok 4.7 红队能力,用于防御研究。

Grok 4.7 在 Amazon Bedrock 上的封装方式

Grok 4.7 接受文本和图像输入,并返回文本。该模型通过跨区域推理配置文件在 bedrock-runtime 端点上提供服务,因此请求需要指定配置文件,而非直接指定基础模型 ID:

推理选项 模型 ID 基础 URL
地理跨区域 us.xai.grok-4.7 https://bedrock-runtime.{region}.amazonaws.com/openai/v1
全局跨区域 global.xai.grok-4.7 https://bedrock-runtime.{region}.amazonaws.com/openai/v1

Grok 4.7 支持 Responses API、Chat Completions API、InvokeModel 和 Converse API。

由于该模型兼容 OpenAI,你可以选择不同的客户端。OpenAI SDK 可通过带有 Bearer token 的 /openai/v1 路径访问;该 token 可以是 Amazon Bedrock API 密钥,也可以是由 AWS Identity and Access Management(IAM)凭证生成的短期 token。AWS SDK 则可通过 Converse 访问同一个模型,并使用常规 AWS 凭证对请求进行签名。如果要迁移现有集成,请使用 OpenAI SDK。如果希望账户中各模型采用统一的消息格式,并通过标准 Bedrock 事件类型使用调用日志和响应流式传输,请使用 Converse。

将 Grok 4.7 与 Bedrock 功能结合使用

对于重复的提示词前缀,隐式提示词缓存会自动生效。因此,若 Agent 在每一轮都重新发送大型系统提示词或参考文档,该前缀将按缓存费率计费。Amazon Bedrock Guardrails 可在请求中通过 ID 和版本附加,对提示词和响应同时应用内容过滤、拒绝主题、个人身份信息(PII)脱敏及词语策略。对于可能在多步骤中无人值守运行的模型,这一功能非常有用。借助结构化输出,你可以将响应限制为 JSON Schema,从而让下游代码直接解析。调用日志会在 Amazon CloudWatch 中记录每次调用,包括请求、响应以及 token 数量,其中也包括推理 token。这可为长时间运行的 Agent 提供审计轨迹。

区域与推理选项

Grok 4.7 通过两种跨区域推理配置文件之一进行路由,而不是固定在单一 Region 中。

全局配置文件 global.xai.grok-4.7 会将每个请求路由至任意受支持的商业 AWS Region,通过更大的容量池分散负载,其价格也低于地理配置文件。相应的权衡是,你对某个请求实际在哪个位置处理的控制较少,因此延迟可能有更大波动。

美国地理配置文件 us.xai.grok-4.7 将处理限制在美国地理范围内,可满足美国数据驻留要求。当你有数据驻留约束或对延迟敏感的流量时应选择它;当成本和吞吐量更重要时,则选择全局配置文件。

服务层级与定价

Standard 为按 token 计费、无需承诺的服务层级,可通过设置 "service_tier": "default" 或省略该字段来选择。Priority 以溢价提供更快、优先级更高的处理("service_tier": "priority")。Flex 则面向对时间不敏感的工作负载,提供成本更低的访问方式("service_tier": "flex")。

服务层级是你可以控制的重要成本杠杆。有关各层级的按 token 定价,请参阅 Amazon Bedrock 定价页面。

发送第一个请求

在首次调用前,请确认该模型已在你计划使用的 AWS Region 对应 Bedrock 控制台中可用。

安装 OpenAI SDK;如果计划使用 Converse API,也请安装 boto3:

pip install openai
pip install boto3

在 Amazon Bedrock 控制台中生成一个长期 Amazon Bedrock API 密钥以供探索使用,然后设置环境变量:

export OPENAI_API_KEY="<provide your Bedrock API key>"
export OPENAI_BASE_URL="https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1"

使用 Chat Completions API 发送第一个请求:

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="us.xai.grok-4.7",
    messages=[
        {"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}
    ],
)
print(response.choices[0].message.content)

通过 Responses API 发起相同调用:

response = client.responses.create(
    model="us.xai.grok-4.7",
    input="Can you explain the features of Amazon Bedrock?",
)
print(response.output_text)

以及通过 boto3 使用 Converse API。由于推理始终处于启用状态,第一个内容块携带推理内容,回答位于后续块中,因此应在各内容块中查找文本,而不是索引 content[0]:

import boto3

client = boto3.client("bedrock-runtime", region_name="us-east-1")

response = client.converse(
    modelId="us.xai.grok-4.7",
    messages=[
        {"role": "user", "content": [{"text": "Can you explain the features of Amazon Bedrock?"}]}
    ],
    inferenceConfig={"maxTokens": 2048},
)

blocks = response["output"]["message"]["content"]
text = next(b["text"] for b in blocks if "text" in b)
print(text)

在 Converse 中,应通过 additionalModelRequestFields 而不是 reasoning 参数设置推理强度:

response = client.converse(
    modelId="us.xai.grok-4.7",
    messages=[{"role": "user", "content": [{"text": "What is 17*23? Number only."}]}],
    inferenceConfig={"maxTokens": 3000},
    additionalModelRequestFields={"reasoning_effort": "xhigh"},
)

有三项运营注意事项。第一,请求必须指定 us.xai.grok-4.7 或 global.xai.grok-4.7。

第二,bedrock:InvokeModel 会针对三类资源进行评估:账户的默认项目、指定的推理配置文件,以及底层基础模型(FM)。由于跨区域配置文件会将请求路由到调用 Region 之外,基础模型的 Amazon Resource Name(ARN)需要在各 Region 中使用通配符。Bearer token 身份验证还要求 bedrock:CallWithBearerToken 权限,而 boto3 和 Converse 无需该权限:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "bedrock:InvokeModel",
            "Resource": [
                "arn:aws:bedrock:{region}:{account-id}:project/default",
                "arn:aws:bedrock:{region}:{account-id}:inference-profile/us.xai.grok-4.7",
                "arn:aws:bedrock:*::foundation-model/xai.grok-4.7"
            ]
        },
        {
            "Effect": "Allow",
            "Action": "bedrock:CallWithBearerToken",
            "Resource": "*"
        }
    ]
}

请列出你计划调用的每一个推理配置文件。配置文件按单独范围授权,因此仅指定 us.xai.grok-4.7 的策略并不覆盖 global.xai.grok-4.7。

第三,这两种身份验证机制覆盖不同的代码路径。OPENAI_API_KEY 中的 Amazon Bedrock API 密钥会作为 Bearer token 传递,用于验证 OpenAI 兼容调用。相比之下,boto3 的 Converse 示例使用 SigV4 签名,并使用来自环境变量、配置文件或角色的常规 AWS 凭证。如果打算在使用 OpenAI 兼容 API 的同时使用 Converse,请同时配置两种方式。

应将长期 API 密钥仅作为探索用途的凭证。生产环境中,请使用 aws-bedrock-token-generator 包基于 IAM 凭证生成短期 Bearer token,因为它们会自动过期,并使访问权限与 IAM 身份保持绑定。

使用推理强度

Grok 4.7 的推理功能始终启用,而推理强度是你可控制其成本和延迟的主要手段。你可以在 Responses API 中通过 reasoning 参数设置 low、medium、high 或 xhigh,并在 Converse 中通过 additionalModelRequestFields 进行设置。

默认值为 high。值得显式设置该值,而不是继承默认值,因为在对延迟敏感或高调用量的请求中不设置它,会消耗超出这些调用实际需要的推理 token。

由于模型经过训练,可工作更长时间并验证自身输出,更高的推理强度带来的不只是对单个答案的额外思考:它还会在长任务中提供更多自我检查。简短的信息提取和分类调用适合使用 low。多步骤规划、长 Agent 轨迹,以及早期错误会传播的工作负载,则是 high 和 xhigh 值得消耗 token 的场景。

推理内容经过加密。你可以在 Responses API 请求中传入以下内容以获取它:include: ["reasoning.encrypted_content"]
然后在后续轮次中将该内容发送回去,使模型能在多轮对话中将其自身先前的推理作为上下文。Chat Completions API 不会返回推理 token。

from openai import OpenAI

client = OpenAI()  # OPENAI_BASE_URL points at the bedrock-runtime endpoint

response = client.responses.create(
    model="us.xai.grok-4.7",
    reasoning={"effort": "high"},
    include=["reasoning.encrypted_content"],
    input="Explain quantum entanglement simply.",
)
print(response.output_text)

如需确定额外推理在哪个点开始不再物有所值,请进行基准测试

English / 原文

xAI’s Grok 4.7 is now available on Amazon Bedrock, adding a frontier model built for coding, long-running agents, and knowledge work to the Bedrock model catalog. It offers a 500K token context window and supports configurable reasoning effort at four levels: low, medium, high, and xhigh.

Grok 4.7 is served on the bedrock-runtime endpoint through cross-Region inference profiles, and it supports the Responses, Chat Completions, and Converse APIs. According to xAI, it’s their most capable model for coding and knowledge work: it works longer on difficult tasks and verifies its own output more carefully before moving on.

This post covers what xAI says Grok 4.7 is designed for, how it is packaged on Amazon Bedrock, and how to send your first request.

What Grok 4.7 is built for

The capability and training details in this section come from xAI’s launch announcement, Introducing Grok 4.7, published September 21, 2026, and from the Grok 4.7 model documentation.

xAI positions Grok 4.7 as its most capable model for coding and knowledge work. The theme is endurance rather than raw speed: the model works longer on difficult tasks and checks its own work more carefully before moving on.

On training, xAI reports that Grok 4.7 uses a new and larger base model. It was trained with a longer reinforcement learning run over a harder mix of tasks, deliberately weighted toward problems that take many hours to complete. Two capabilities came out of that: the model is better at verifying its own work, and makes more effective use of its 500K token context window on long tasks. xAI also trained it to natively understand the Grok Bot harness, which it credits for improvements in conversational tasks and general knowledge work.

For anyone building agents, the self-verification behavior is the detail worth noting. A model that checks its own output before continuing tends to fail less catastrophically on long trajectories, where an early mistake otherwise compounds through every later step.

xAI also calls out stronger document and presentation generation, and describes gains on professional knowledge work of the kind done by lawyers, nurses, and financial analysts. xAI reports gains across its published evaluations. These span software engineering with CursorBench and DeepSWE, multi-hour terminal and office work with Terminal-Bench and AA Briefcase, electrical engineering with EEBench, legal work with the Harvey Legal Agent Benchmark, and clinical reasoning with HealthBench Professional. For the results themselves, see xAI’s announcement.

Independent evaluation

Artificial Analysis runs its own evaluations rather than relying on developer-reported figures, which makes it a useful second reference alongside xAI’s published results.

According to Artificial Analysis, Grok 4.7 improves across its evaluation suite. The largest gains are on long-horizon agentic knowledge work and on coding agents run in xAI’s own harness. The Intelligence Index is a composite built from multiple independent evaluations covering agentic tool use, reasoning and knowledge, knowledge reliability, and long-context work.

Measure (Artificial Analysis) Grok 4.7 Grok 4.6
Intelligence Index 46 44
Coding Agent Index 56 47
AA-Briefcase, long-horizon knowledge work (Elo) 1,657 1,546
GDPval-AA, professional work products (Elo) 1,695 1,605
AA-Omniscience Index 32 30
AA-Omniscience hallucination rate 29% 34%
Output tokens per Intelligence Index task ~81k ~38k

Grok 4.7 is measured at xhigh reasoning effort, and Grok 4.6 at the effort level Artificial Analysis reported for each measure. The final row is the tradeoff to plan for: the gains come with roughly double the output tokens per task. That’s why it pays to set the effort level deliberately rather than inheriting the default.

Safety and cyber security

According to xAI, Grok 4.7 was built with an entirely new safeguard stack and is the strongest model it has tested on refusals and jailbreak resistance. xAI frames the goal in dual-use domains such as cyber security and biological work as holding two things at once: remaining useful for legitimate tasks while refusing dangerous ones.

On cyber security specifically, xAI reports the model allows only a small fraction of risky dual-use prompts through while rarely blocking legitimate security work. xAI has also begun giving selected cyber security partners invite-only access to Grok 4.7’s red-team capabilities for defense research.

How Grok 4.7 is packaged on Amazon Bedrock

Grok 4.7 accepts text and image input and returns text. The model is served on the bedrock-runtime endpoint through cross-Region inference profiles, so requests name a profile rather than a bare model ID:

Inference option Model ID Base URL
Geo cross-Region us.xai.grok-4.7 https://bedrock-runtime.{region}.amazonaws.com/openai/v1
Global cross-Region global.xai.grok-4.7 https://bedrock-runtime.{region}.amazonaws.com/openai/v1

Grok 4.7 supports the Responses API, the Chat Completions API, InvokeModel and the Converse API.

Because the model is OpenAI-compatible, you have a choice of client. The OpenAI SDK works against the /openai/v1 path with a bearer token, which can be either an Amazon Bedrock API key or a short-term token minted from your AWS Identity and Access Management (IAM) credentials. The AWS SDKs reach the same model through Converse, signing requests with your ordinary AWS credentials. Use the OpenAI SDK if you’re porting an existing integration. Use Converse if you want one message shape across the models in your account, along with invocation logging and response streaming through the standard Bedrock event types.

Using Grok 4.7 with Bedrock features

Implicit prompt caching applies automatically to repeated prompt prefixes, so agents that resend a large system prompt or reference document on every turn pay the cached rate for that prefix. Amazon Bedrock Guardrails attach by ID and version on the request, applying content filters, denied topics, personally identifiable information (PII) redaction, and word policies to both the prompt and the response. This is useful for a model that might run unattended across many steps. With structured outputs, you can constrain a response to a JSON Schema so downstream code can parse it directly. Invocation logging captures each call in Amazon CloudWatch with the request, the response, and token counts including reasoning tokens. This gives you an audit trail for long agent runs.

Regions and inference options

Grok 4.7 routes through one of two cross-Region inference profiles rather than pinning to a single Region.

The Global profile, global.xai.grok-4.7, routes each request to any supported commercial AWS Region, spreading load across more capacity, and is priced below a geographic profile. The tradeoff is less control over where a given request is served, which can mean more variable latency.

The US geographic profile, us.xai.grok-4.7, keeps processing within the US geography, which addresses US data residency requirements. Choose it when you have residency constraints or latency-sensitive traffic, and Global when cost and throughput matter more.

Service tier and pricing

Standard is pay-per-token with no commitment, selected by setting "service_tier": "default" or omitting the field. Priority delivers faster, prioritized processing for a premium ("service_tier": "priority"). Flex offers lower-cost access for work that isn’t time-sensitive ("service_tier": "flex").

Service tier is a significant cost lever that you control. For per-token pricing across the tiers, see the Amazon Bedrock pricing page.

Send your first request

Before your first call, confirm that the model is available to you in the Bedrock console for the AWS Region that you plan to use.

Install the OpenAI SDK, and boto3 if you plan to use the Converse API:

pip install openai
pip install boto3

Generate a long-term Amazon Bedrock API key from the Amazon Bedrock console for exploration, then set your environment:

export OPENAI_API_KEY="<provide your Bedrock API key>"
export OPENAI_BASE_URL="https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1"

A first request with the Chat Completions API:

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="us.xai.grok-4.7",
    messages=[
        {"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}
    ],
)
print(response.choices[0].message.content)

The same call through the Responses API:

response = client.responses.create(
    model="us.xai.grok-4.7",
    input="Can you explain the features of Amazon Bedrock?",
)
print(response.output_text)

And through the Converse API with boto3. Because reasoning is always active, the first content block carries the reasoning and the answer sits in a later block, so search the blocks for the text rather than indexing content[0]:

import boto3

client = boto3.client("bedrock-runtime", region_name="us-east-1")

response = client.converse(
    modelId="us.xai.grok-4.7",
    messages=[
        {"role": "user", "content": [{"text": "Can you explain the features of Amazon Bedrock?"}]}
    ],
    inferenceConfig={"maxTokens": 2048},
)

blocks = response["output"]["message"]["content"]
text = next(b["text"] for b in blocks if "text" in b)
print(text)

On Converse, you set the effort level through additionalModelRequestFields rather than a reasoning parameter:

response = client.converse(
    modelId="us.xai.grok-4.7",
    messages=[{"role": "user", "content": [{"text": "What is 17*23? Number only."}]}],
    inferenceConfig={"maxTokens": 3000},
    additionalModelRequestFields={"reasoning_effort": "xhigh"},
)

Three operational notes. First, requests must name us.xai.grok-4.7 or global.xai.grok-4.7.

Second, bedrock:InvokeModel is evaluated against three resources: your account’s default project, the inference profile you name, and the underlying foundation model (FM). The foundation model Amazon Resource Name (ARN) is wildcarded across Regions because cross-Region profiles route outside the calling Region. Bearer-token authentication additionally requires bedrock:CallWithBearerToken, which boto3 and Converse don’t need:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "bedrock:InvokeModel",
            "Resource": [
                "arn:aws:bedrock:{region}:{account-id}:project/default",
                "arn:aws:bedrock:{region}:{account-id}:inference-profile/us.xai.grok-4.7",
                "arn:aws:bedrock:*::foundation-model/xai.grok-4.7"
            ]
        },
        {
            "Effect": "Allow",
            "Action": "bedrock:CallWithBearerToken",
            "Resource": "*"
        }
    ]
}

List every inference profile you plan to call. Profiles are scoped individually, so a policy naming us.xai.grok-4.7 does not cover global.xai.grok-4.7.

Third, the two authentication mechanisms cover different code paths. An Amazon Bedrock API key in OPENAI_API_KEY travels as a bearer token and authenticates the OpenAI-compatible calls. The boto3 Converse examples sign with SigV4 instead, drawing on your ordinary AWS credentials from the environment, a profile, or a role. Configure both if you intend to use Converse alongside the OpenAI-compatible APIs.

Treat a long-term API key as an exploration-only credential. For production, use short-term bearer tokens generated from your IAM credentials with the aws-bedrock-token-generator package, since they expire automatically and keep access tied to your IAM identity.

Working with reasoning effort

Reasoning is active on Grok 4.7, and effort level is a primary control you have over its cost and latency. You configure it through the reasoning parameter on the Responses API with low, medium, high, or xhigh, and through additionalModelRequestFields on Converse.

The default is high. That’s worth setting explicitly rather than inheriting, because leaving it unset on latency-sensitive or high-volume calls will spend more reasoning tokens than those calls need.

Because the model is trained to work longer and verify its own output, higher effort buys more than extra deliberation on a single answer: it buys more self-checking across a long task. Short extraction and classification calls belong at low. Multi-step planning, long agent trajectories, and work where an early error propagates are where high and xhigh earn their tokens.

Reasoning content is encrypted. You can have it returned by passing the following on a Responses API request.include: ["reasoning.encrypted_content"]
Then send that content back on subsequent turns to give the model its own prior reasoning as context in a multi-turn conversation. The Chat Completions API doesn’t return reasoning tokens.

from openai import OpenAI

client = OpenAI()  # OPENAI_BASE_URL points at the bedrock-runtime endpoint

response = client.responses.create(
    model="us.xai.grok-4.7",
    reasoning={"effort": "high"},
    include=["reasoning.encrypted_content"],
    input="Explain quantum entanglement simply.",
)
print(response.output_text)

To find where additional reasoning stops paying for itself, benchmark the levels against your own workload.

Get started

With Grok 4.7 in Amazon Bedrock, you get a 500K token context window, four reasoning effort levels, image input, tool calling, and Geo and Global cross-Region routing. All of it is reachable through the Responses, Chat Completions, and Converse APIs.

To start building, review the Grok 4.7 model card for the current Region list, feature matrix, and parameter details, and check the Amazon Bedrock pricing page for token rates. If you generated a long-term Amazon Bedrock API key for exploration, delete it from the Amazon Bedrock console when you are finished. A standing credential you no longer need only widens your account’s attack surface.

Sources


About the authors

Suheel Farooq

Suheel is a Principal Solutions Architect at AWS, specializing in artificial intelligence, machine learning, and generative AI. He helps Foundation Model Provider customers design, build, modernize, and scale their AI/ML and generative AI workloads on AWS — from bringing foundation models to Amazon Bedrock to optimizing training and inference and building Agentic AI solutions. His experience spans the AWS AI/ML and generative AI portfolio, particularly Amazon Bedrock, Amazon Bedrock AgentCore, and Amazon SageMaker AI. In his free time, Suheel enjoys working out and hiking.

William Yap

William is Principal Product Manager for Amazon Bedrock.

Ikenna Izugbokwe

Ikenna is a Principal Solutions Architect at AWS specializing in networking, containers, and AI infrastructure. He guides model providers through scaling their training and inference systems while enabling rapid deployment of evolving frontier models on AWS. His work increasingly spans agentic AI – building reliable, cost-efficient multi-agent systems and the inference infrastructure behind them in production.

Anirban Gupta

Anirban is a Principal Engineer at AWS based in Seattle, USA, where he focuses on the design of secure, high-scale model-serving infrastructure for Amazon Bedrock. He has driven the technical work behind several foundation-model launches on the platform. Prior to joining Amazon Bedrock, he was a Principal Engineer on AWS Outposts, building hybrid on-premises cloud infrastructure.

Fabio Branco

Fabio is a Senior Customer Solutions Manager at Amazon Web Services (AWS) and strategic advisor guiding foundational model providers in their go-to-market journey. Prior to AWS, he held Product Management, Engineering, Consulting, and Technology Delivery roles across multiple Fortune 500 companies in industries, including retail and consumer goods, oil and gas, financial services, insurance, and aerospace and defense.