
I Tried Grok 4.6 on Amazon Bedrock with the Grok Build CLI
This page has been translated by machine translation. View original
Introduction
On August 19, 2026, xAI's Grok 4.6 became available on Amazon Bedrock.
I previously tried Grok Build CLI with Grok 4.5 on X Premium+.
This time I had the chance to configure a custom model in Grok Build CLI (1.0.5) and confirm that Grok 4.6 works via Amazon Bedrock, so I'll introduce it here. I do not verify its functionality as a coding agent.
What I Verified
I proceeded in this order: installation and Bedrock configuration, checking behavior in interactive mode, headless execution, and checking the data retention settings.
Test Environment
This is the environment on which the results here are based.
| Item | Value |
|---|---|
| OS | Fedora Asahi Remix 44 (Linux 7.1.6-400.asahi.fc44.aarch64+16k) |
| Architecture | aarch64 (Apple Silicon) |
| Grok Build CLI | 1.0.5 (stable) |
| Bedrock region | us-west-2 |
| Model ID | xai.grok-4.6 |
| Custom model name | grok-4.6-bedrock |
Installation and Bedrock Configuration
I installed Grok Build CLI with the official installer.
curl -fsSL https://x.ai/cli/install.sh | bash
The version after installation was grok 1.0.5 (5115b46bc9) [stable].
In Grok Build CLI, you can define custom models in ~/.grok/config.toml and call any OpenAI-compatible endpoint. The specification of the settings is described in the documentation bundled with the CLI (~/.grok/docs/user-guide/11-custom-models.md) and on the official site.
Amazon Bedrock provides an OpenAI-compatible API at the bedrock-mantle.{region}.api.aws endpoint.
The endpoint for each region can be found in the following list.
For the custom model grok-4.6-bedrock for Amazon Bedrock, I set the following values. Because the model name contains ., the section name is enclosed in quotation marks in TOML.
[model."grok-4.6-bedrock"]
model = "xai.grok-4.6"
base_url = "https://bedrock-mantle.us-west-2.api.aws/openai/v1"
api_backend = "chat_completions"
env_key = "GROK_BEDROCK_TOKEN"
Bearer Token is used for authentication on the Bedrock side. With the Python library aws_bedrock_token_generator provided by AWS, you can generate a short-term Bearer Token from your AWS credentials. The token's validity period is up to 12 hours. The package name at install time is hyphen-separated, and the import name is underscore-separated.
pip install aws-bedrock-token-generator
The installation steps and the token validity period are explained on the following page.
I set the value returned by provide_token(region=...) in the environment variable specified by env_key, and then launched Grok Build CLI.
export GROK_BEDROCK_TOKEN="$(python -c 'from aws_bedrock_token_generator import provide_token; print(provide_token(region="us-west-2"))')"
Checking Behavior in Interactive Mode
First, I checked that the AWS credentials used to generate the Bearer Token point to the intended account.
aws sts get-caller-identity --query Account --output text
XXXXXXXXXXXX
I launched interactive mode, specifying the custom model via an argument.
grok -m grok-4.6-bedrock
The startup screen showed "Grok 4.6 (Amazon Bedrock)" and "Logged in with API key".

After one round trip of prompts, I switched tabs and checked the Usage-related screens. The call via Bedrock succeeded, and token usage was recorded in the session totals on the Grok Build CLI side.
The Usage limit screen showed Session usage (since start or last resume).
The values were Input tokens 10,710 / Output tokens 39 (22 reasoning) / Total tokens 10,749.
Model calls 1, API time 1.8s, and Cost: not available (not reported) were also listed.

Session info listed Model: Grok 4.6 (Amazon Bedrock) and API Backend: ChatCompletions.
Turn: 1 and Context: 10749 / 500000 tokens (2%) could also be read on this screen.

When I switched to Context usage, the model was shown as xai.grok-4.6 and the context limit was 500k tokens.

Headless Execution
Separately from interactive mode, I sent a Japanese prompt in headless mode.
grok -m grok-4.6-bedrock \
-p "日本語で挨拶してください。今日のAWSの調子はどうですか?" \
--output-format json
The beginning of the response is as follows.
I'll greet you in Japanese while checking today's AWS operating status. Hello. I look forward to working with you today as well.
This is the JSON output obtained with --output-format json. Only the beginning of the response body (text) is shown, and the session identifiers are masked.
{
"text": "日本語でご挨拶しつつ、今日のAWSの稼働状況を確認します。こんにちは。今日もよろしくお願いします。\n\n(以下略)",
"stopReason": "end_turn",
"sessionId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"requestId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"usage": {
"input_tokens": 44827,
"cache_read_input_tokens": 1536,
"cache_creation_input_tokens": 0,
"output_tokens": 911,
"reasoning_tokens": 193,
"total_tokens": 47274
},
"num_turns": 4,
"modelUsage": {
"xai.grok-4.6": {
"inputTokens": 44827,
"outputTokens": 911,
"cacheReadInputTokens": 1536,
"cacheCreationInputTokens": 0,
"modelCalls": 4
}
}
}
The model ID xai.grok-4.6 is recorded as the key of modelUsage, so we can conclude that the call via Bedrock succeeded.
For a single prompt execution, both modelCalls and num_turns directly under the JSON root were 4.
Summary
Just by registering a custom model and passing the Bearer Token through an environment variable, I was able to use Grok 4.6 on Bedrock from Grok Build CLI.
Bedrock is pay-as-you-go based on token volume, so there is no fixed monthly fee. If you want to consolidate authentication and billing into your AWS account, or want to use Grok 4.6 in a way that does not pass inputs and outputs to the model provider, please try the configuration introduced here.
