Amazon Bedrockで利用可能になったxAIのGrok 4.6を試してみた
はじめに
2026年8月19日のAWS What's Newで、Amazon BedrockのxAI Grok 4.6サポートが発表されました。
xAIがGrok 4.6を公開したのは2026年8月12日で、Bedrock対応まで約1週間でした。
Grok 4.3はbedrock-mantleエンドポイント専用でしたが、Grok 4.6のモデルカードにはbedrock-mantleとbedrock-runtimeの両方が記載されています。
本記事では、Grok 4.3で利用していたIAM認証とbedrock-mantle経由のOpenAI互換APIが、Grok 4.6でも利用できるかを検証しました。あわせて、bedrock-runtime経由での呼び出しの可否も確認しました。
変更点
Bedrockで提供されていた前バージョンのGrok 4.3から4.6への変更点をまとめました。xAI公式では4.3→4.5→4.6の順にリリースされていますが、Bedrockでは4.5が提供されておらず、4.3から4.6へ直接ジャンプしています。
出典:Grok 4.6モデルカード、Grok 4.3モデルカード(両方確認日:2026-08-19)
| 項目 | Grok 4.3 | Grok 4.6 |
|---|---|---|
| モデルID | xai.grok-4.3 |
xai.grok-4.6 |
| コンテキストウィンドウ | 1M トークン | 500K トークン |
| Reasoning | none/low/medium/high | low(既定)/medium/high/xhigh |
| 対応エンドポイント | bedrock-mantleのみ | bedrock-mantle + bedrock-runtime |
| リージョン | us-west-2のみ | us-west-2(In-Region、Mantle) |
料金
On-Demand料金を、100万トークンあたり(per 1M tokens)で比較します。
| モデル | 入力 | 出力 |
|---|---|---|
| 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 |
出典・確認日(すべて2026-08-19)
- Grok 4.6: Grok 4.6モデルカード(In-Region、us-west-2)
- Grok 4.3: Grok 4.3モデルカード
- GPT-5.6 Terra: GPT-5.6 Terraモデルカード(Short Context Window/272K、In-Region)
- Claude Sonnet 5: Bedrock公式料金ページAnthropicセクション(Geo and In-region Cross-region Inference、米国東部)
なお、本記事で検証したbedrock-mantleはIn-Region構成のため、Grok 4.6の料金は表の「In-Region」の単価が適用されます。
検証内容
Grok 4.6は、現時点でbedrock-mantleエンドポイント経由で呼び出せることを確認しました。認証にはIAM RoleのAssumeRoleで取得した一時AWS認証情報を使いました。aws-bedrock-token-generatorで短期Bearer Tokenを1回生成し、OpenAI SDKのクライアントに渡して複数回のAPI呼び出しに再利用する流れです。
Bearer Tokenの取得
検証用IAM RoleをAssumeRoleして一時AWS認証情報を設定し、provide_tokenでBearer Tokenを取得しました。
認証コード(Bash + Python)
# 検証用IAM RoleをAssumeRoleし、一時AWS認証情報を環境変数へ設定
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"
# Bearer Tokenは1回だけ生成し、client経由で以降のすべての呼び出しに再利用する
token = provide_token(region=region)
client = OpenAI(base_url=base_url, api_key=token)
以降の呼び出しは、すべて上記で作成した同一のclientを再利用しました。
テキスト生成
Chat CompletionsとResponsesで同じプロンプトを実行しました。どちらもHelloという応答を返しました。
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"))
実行結果(実測、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"))
実行結果(実測、JSON):
{
"id": "resp_<REQUEST_ID>",
"output_text": "Hello",
"usage": {
"input_tokens": 38,
"output_tokens": 225,
"output_tokens_details": {
"reasoning_tokens": 215
},
"total_tokens": 263
}
}
画像入力
前節で作成したclientを使い、Chat Completionsに画像を入力しました。Base64エンコードしたPNG画像をimage_urlとして渡し、画像内のロゴと文字を日本語で説明するよう指示しました。
Base64エンコード
import base64
from pathlib import Path
# リポジトリ内の検証画像
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)
実行結果(実測、JSON抜粋):
{
"finish_reason": "stop",
"content": "紫色の角丸四角形内に白い幽霊アイコン(黒い目2つ)があり、右に白い大文字で「KIRO」と書かれたロゴです。黒い背景。",
"usage": {
"prompt_tokens": 815,
"completion_tokens": 221,
"total_tokens": 1036,
"reasoning_tokens": 172
}
}
図形もロゴ内の文字も読み取った応答が返りました。bedrock-mantle経由のテキスト応答(Chat Completions・Responses両方)と画像解析(Chat Completions)が一通り動作しました。
bedrock-runtime確認
Runtime専用IAM RoleをAssumeRoleした一時認証情報で、次のConverse API呼び出しを実行しました。
aws bedrock-runtime converse \
--region us-west-2 \
--model-id us.xai.grok-4.6 \
--messages '[{"role":"user","content":[{"text":"Hello とだけ短く返してください。"}]}]' \
--output json
実行結果は次のとおりです。
aws: [ERROR]: An error occurred (ValidationException) when calling the Converse operation: The provided model identifier is invalid.
あわせて、推論プロファイルの提供状況をus-west-2と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
いずれのリージョンでもGrok/xAI関連プロファイルは0件でした。推論プロファイルが確認できるようになったら、bedrock-runtime経由の呼び出しを改めて検証する予定です。
データ保持設定の確認
Bedrockでは、推論時の入出力を保持するかどうかをアカウントまたはプロジェクト単位のデータ保持モードで制御します。モデル側も、許可するモードを allowed_modes として宣言しています。生成済みの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"
}
mode は default、source は model_default でした。アカウント側は次のコマンドで inherit と確認できたので、モデルの既定がそのまま適用されます。
aws bedrock get-account-data-retention --region us-west-2
{
"mode": "inherit"
}
default では、AWSが不正利用検知の目的で入出力を保持する場合がありますが、モデルプロバイダーには渡りません。allowed_modes に none も含まれているため、ゼロデータ保持を選ぶこともできます。各モードの意味は以下のページにまとまっています。
まとめ
xAIはGrok 4.6を、各種ベンチマークでハイエンドモデルに位置付けています。そのGrok 4.6がAmazon Bedrockでサポートされ、IAM認証やAWSに閉じた利用も可能になりました。
料金は入力$2.20、出力$6.60/100万トークンで、Claude Sonnet 5やGPT-5.6 Terraと比較しやすいミドルレンジです。ClaudeやOpenAI以外の選択肢として、有力な候補になりえます。








