I tried xAI's Grok 4.6, which became available on Amazon Bedrock, using Mantle
This page has been translated by machine translation. View original
Introduction
On August 19, 2026, the AWS What's New announced support for xAI Grok 4.6 on Amazon Bedrock.
xAI released Grok 4.6 on August 12, 2026, meaning it took about one week to become available on Bedrock.
Grok 4.3 was exclusive to the bedrock-mantle endpoint, but the Grok 4.6 model card lists both bedrock-mantle and bedrock-runtime.
In this article, we verified whether the IAM authentication and OpenAI-compatible API via bedrock-mantle used with Grok 4.3 can also be used with Grok 4.6. We also confirmed whether invocation via bedrock-runtime is possible.
Changes
We summarized the changes from the previous version Grok 4.3 to 4.6 available on Bedrock. While xAI officially released them in the order 4.3 → 4.5 → 4.6, Bedrock did not offer 4.5, jumping directly from 4.3 to 4.6.
Source: Grok 4.6 model card, Grok 4.3 model card (both checked: 2026-08-19)
| Item | Grok 4.3 | Grok 4.6 |
|---|---|---|
| Model ID | xai.grok-4.3 |
xai.grok-4.6 |
| Context window | 1M tokens | 500K tokens |
| Reasoning | none/low/medium/high | low (default)/medium/high/xhigh |
| Supported endpoints | bedrock-mantle only | bedrock-mantle + bedrock-runtime |
| Region | us-west-2 only | us-west-2 (In-Region, Mantle) |
Pricing
We compare On-Demand pricing per 1M tokens.
| Model | Input | Output |
|---|---|---|
| Grok 4.6 (In-Region) | $2.20 | $6.60 |
| Grok 4.3 | $1.25 | $2.50 |
| GPT-5.6 Terra (In-Region, 272K) | $2.20 | $13.20 |
| Claude Sonnet 5 (Geo/In-region) | $2.20 | $11.00 |
Sources and check dates (all 2026-08-19)
- Grok 4.6: Grok 4.6 model card (In-Region, us-west-2)
- Grok 4.3: Grok 4.3 model card
- GPT-5.6 Terra: GPT-5.6 Terra model card (Short Context Window/272K, In-Region)
- Claude Sonnet 5: Bedrock official pricing page Anthropic section (Geo and In-region Cross-region Inference, US East)
Note that the bedrock-mantle verified in this article uses an In-Region configuration, so the "In-Region" unit price in the table applies to Grok 4.6.
Verification Details
We confirmed that Grok 4.6 can currently be invoked via the bedrock-mantle endpoint. Temporary AWS credentials obtained via AssumeRole of an IAM Role were used for authentication. The flow involves generating a short-lived Bearer Token once using aws-bedrock-token-generator, passing it to an OpenAI SDK client, and reusing it for multiple API calls.
Obtaining a Bearer Token
We assumed a test IAM Role via AssumeRole to set temporary AWS credentials, then obtained a Bearer Token using provide_token.
Authentication code (Bash + Python)
# Assume a test IAM Role via AssumeRole and set temporary AWS credentials as environment variables
assume_json="$(aws sts assume-role \
--role-arn "$GROK_ROLE_ARN" \
--role-session-name grok-4-6-reproduction \
--duration-seconds 3600 \
--output json)"
read -r access_key secret_key session_token < <(
printf '%s' "$assume_json" | python3 -c '
import json, sys
c = json.load(sys.stdin)["Credentials"]
print(c["AccessKeyId"], c["SecretAccessKey"], c["SessionToken"])
'
)
export AWS_ACCESS_KEY_ID="$access_key"
export AWS_SECRET_ACCESS_KEY="$secret_key"
export AWS_SESSION_TOKEN="$session_token"
from aws_bedrock_token_generator import provide_token
from openai import OpenAI
region = "us-west-2"
base_url = f"https://bedrock-mantle.{region}.api.aws/openai/v1"
# Generate the Bearer Token only once and reuse it for all subsequent calls via the client
token = provide_token(region=region)
client = OpenAI(base_url=base_url, api_key=token)
All subsequent calls reused the same client created above.
Text Generation
We ran the same prompt using both Chat Completions and Responses. Both returned a "Hello" response.
response = client.chat.completions.create(
model="xai.grok-4.6",
messages=[{"role": "user", "content": "Hello とだけ短く返してください。"}],
)
print(response.choices[0].finish_reason)
print(response.choices[0].message.content)
print(response.usage.model_dump(mode="json"))
Execution result (actual measurement, JSON):
{
"id": "chatcmpl-<REQUEST_ID>",
"finish_reason": "stop",
"content": "Hello",
"usage": {
"completion_tokens": 151,
"prompt_tokens": 38,
"total_tokens": 189,
"completion_tokens_details": {
"reasoning_tokens": 141
}
}
}
response = client.responses.create(
model="xai.grok-4.6",
input="Hello とだけ短く返してください。",
)
print(response.output_text)
print(response.usage.model_dump(mode="json"))
Execution result (actual measurement, JSON):
{
"id": "resp_<REQUEST_ID>",
"output_text": "Hello",
"usage": {
"input_tokens": 38,
"output_tokens": 225,
"output_tokens_details": {
"reasoning_tokens": 215
},
"total_tokens": 263
}
}
Image Input
Using the client created in the previous section, we provided an image as input to Chat Completions. A Base64-encoded PNG image was passed as an image_url, with instructions to describe the logo and text in the image in Japanese.
PNG image used for verification
Base64 encoding
import base64
from pathlib import Path
# Test image in the repository
image_path = Path("test-inputs/aws-kiro.png")
image_data = base64.b64encode(image_path.read_bytes()).decode("ascii")
response = client.chat.completions.create(
model="xai.grok-4.6",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "この画像を日本語で簡潔に解説してください。画像内の文字も読み取ってください。"},
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_data}"}},
],
}
],
)
print(response.choices[0].message.content)
Execution result (actual measurement, JSON excerpt):
{
"finish_reason": "stop",
"content": "紫色の角丸四角形内に白い幽霊アイコン(黒い目2つ)があり、右に白い大文字で「KIRO」と書かれたロゴです。黒い背景。",
"usage": {
"prompt_tokens": 815,
"completion_tokens": 221,
"total_tokens": 1036,
"reasoning_tokens": 172
}
}
A response that identified both the shape and the text in the logo was returned. Text responses via bedrock-mantle (both Chat Completions and Responses) and image analysis (Chat Completions) all worked as expected.
bedrock-runtime Check
Using temporary credentials obtained by assuming a runtime-dedicated IAM Role, we executed the following Converse API call.
aws bedrock-runtime converse \
--region us-west-2 \
--model-id us.xai.grok-4.6 \
--messages '[{"role":"user","content":[{"text":"Hello とだけ短く返してください。"}]}]' \
--output json
The execution result was as follows.
aws: [ERROR]: An error occurred (ValidationException) when calling the Converse operation: The provided model identifier is invalid.
We also checked the availability of inference profiles in both us-west-2 and us-east-1.
for region in us-west-2 us-east-1; do
aws bedrock list-inference-profiles \
--region "$region" \
--query "inferenceProfileSummaries[?contains(inferenceProfileId, 'xai.grok')].{id:inferenceProfileId,name:inferenceProfileName}" \
--output json
done
No Grok/xAI-related profiles were found in either region. We plan to re-verify invocation via bedrock-runtime once inference profiles become available.
Checking Data Retention Settings
In Bedrock, whether to retain inputs and outputs during inference is controlled by a data retention mode set at the account or project level. The model also declares the modes it allows as allowed_modes. You can check this by retrieving model information with a generated Bearer Token.
curl -s https://bedrock-mantle.us-west-2.api.aws/v1/models/xai.grok-4.6 \
-H "Authorization: Bearer $GROK_BEDROCK_TOKEN"
{
"created": 1786492800,
"data_retention": {
"allowed_modes": [
"provider_data_share",
"none",
"default"
],
"mode": "default",
"source": "model_default"
},
"id": "xai.grok-4.6",
"object": "model",
"owned_by": "system",
"status": "available"
}
The mode was default and the source was model_default. The account side was confirmed to be inherit via the following command, so the model's default is applied as-is.
aws bedrock get-account-data-retention --region us-west-2
{
"mode": "inherit"
}
Under default, AWS may retain inputs and outputs for abuse detection purposes, but they are not passed to the model provider. Since none is also included in allowed_modes, you can specify zero data retention in requests.
Running with data_retention_mode set to none
Using the client created in the previous section, we specified none as data_retention_mode in the extra_body of a Chat Completions request.
response = client.chat.completions.create(
model="xai.grok-4.6",
messages=[
{
"role": "user",
"content": "ゼロデータ保持モードの動作確認です。日本語で「成功」とだけ返してください。",
}
],
extra_body={"data_retention_mode": "none"},
)
print(response.choices[0].finish_reason)
print(response.choices[0].message.content)
print(response.usage.model_dump(mode="json"))
Execution result (actual measurement, JSON):
{
"finish_reason": "stop",
"content": "成功",
"usage": {
"prompt_tokens": 48,
"completion_tokens": 154,
"total_tokens": 202
}
}
Even with data_retention_mode set to none in the request, a response was successfully obtained. The meaning of each mode is summarized on the following page.
Summary
xAI positions Grok 4.6 as a high-end model across various benchmarks. That Grok 4.6 is now supported on Amazon Bedrock, making it possible to use it with IAM authentication and within an AWS-confined environment.
The pricing is $2.20 for input and $6.60 for output per 1M tokens, placing it in an easily comparable middle range alongside Claude Sonnet 5 and GPT-5.6 Terra. Feel free to try it as an alternative to Claude or OpenAI.
