Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

claude-on-amazon-bedrock-legacy changedbuild-with-claude/claude-on-amazon-bedrock-legacy

Nearest release: v2.1.334, published 11 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+161added
Lines−165removed
From line 91 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits49to this page, all time

### API model IDs #### API model IDs

The whole hunk

from line 91, old and new numbered
/
lines
from line 91
9191 import com.anthropic.bedrock.backends.BedrockBackend;
9292 import com.anthropic.models.messages.MessageCreateParams;
9393 import com.anthropic.models.messages.Message;
94 import com.anthropic.models.messages.Model;
9594 
96 public class BasicMessage {
97 public static void main(String[] args) {
98 AnthropicClient client = AnthropicOkHttpClient.builder()
99 .backend(BedrockBackend.fromEnv())
100 .build();
95 void main() {
96 AnthropicClient client = AnthropicOkHttpClient.builder()
97 .backend(BedrockBackend.fromEnv())
98 .build();
10199 
102 MessageCreateParams params = MessageCreateParams.builder()
103 .model(Model.CLAUDE_OPUS_4_6)
104 .maxTokens(1024L)
105 .addUserMessage("What is the capital of France?")
106 .build();
100 MessageCreateParams params = MessageCreateParams.builder()
101 .model("global.anthropic.claude-opus-4-6-v1")
102 .maxTokens(1024L)
103 .addUserMessage("What is the capital of France?")
104 .build();
107105 
108 Message response = client.messages().create(params);
109 response.content().stream()
110 .flatMap(block -> block.text().stream())
111 .forEach(textBlock -> System.out.println(textBlock.text()));
112 }
106 Message response = client.messages().create(params);
107 response.content().stream()
108 .flatMap(block -> block.text().stream())
109 .forEach(textBlock -> IO.println(textBlock.text()));
113110 }
114111 ```
115112 </CodeGroup>
from line 143
146143 
147144Go to the [AWS Console > Bedrock > Model Access](https://console.aws.amazon.com/bedrock/home?region=us-west-2#/modelaccess) and request access to Anthropic models. Note that Anthropic model availability varies by region. See the [AWS documentation on model availability by region](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html) for the latest information.
148145 
149#### API model IDs
146### API model IDs
150147 
151<Note>
152 Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Haiku 5.5, Claude Opus 4.8, and Claude Opus 4.7 are reachable through `InvokeModel` on `bedrock-runtime`. These requests are served by the same infrastructure as the [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) endpoint. For the native Messages API request shape and full feature parity, use that page. These models are omitted from the model table on this page. The table does list Claude Fable 5.2 and Claude Mythos 5.2, because `bedrock-runtime` is the only Amazon Bedrock endpoint that serves them.
153</Note>
148To call a model, pass its inference profile ID: a prefix, a period, and the base model ID. For example, global.anthropic.claude-opus-5-5 calls Claude Opus 5.5. The prefix sets where AWS routes the request through [cross-region inference](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html) (CRIS). To learn how the prefixes affect routing and pricing, see [Global versus regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#global-vs-regional-endpoints).
154149 
155Lifecycle terms (Deprecated, Retired) are defined in [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations). Lifecycle dates on partner-operated platforms are set by the partner and can differ from the Claude API schedule. For the current retirement date of any model on Amazon Bedrock, see [Amazon Bedrock’s model lifecycle page](https://docs.aws.amazon.com/bedrock/latest/userguide/model-lifecycle.html).
150The following table gives each model’s base ID and the prefixes it takes:
156151 
157AWS offers newer Claude models through [cross-region inference](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html) rather than on-demand throughput. For these models, a request that passes the base model ID fails with an HTTP 400 error like the following:
158 
159```text wrap
160Invocation of model ID anthropic.claude-sonnet-4-5-20250929-v1:0 with on-demand throughput isn't supported. Retry your request with the ID or ARN of an inference profile that contains this model.
161```
162 
163To call these models, pass an inference profile instead of the base model ID. The inference profile ID is the base model ID with a prefix from a column marked “Yes” in the following table, for example us.anthropic.claude-sonnet-4-5-20250929-v1:0. You can also pass the full inference profile ARN, in the form `arn:aws:bedrock:{region}:{account-id}:inference-profile/{inference-profile-id}`. For AWS’s authoritative list of available inference profiles, see [Supported Regions and models for inference profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html). To learn how the prefixes affect routing and pricing, see the [Global versus regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#global-vs-regional-endpoints) section.
164 
165| Model | Base Bedrock model ID | `global` | `us` | `eu` | `jp` | `apac` |
152| Model | Base Bedrock model ID | `global` | `us` | `eu` | `jp` | `au` |
166153| :---- | :---- | :---- | :---- | :---- | :---- | :---- |
167154| Claude Fable 5.2 | `anthropic.claude-fable-5-2` | Yes | Yes | No | No | No |
168155| Claude Mythos 5.2 ([limited availability](https://support.claude.com/en/articles/14604842)) | `anthropic.claude-mythos-5-2` | Yes | Yes | No | No | No |
169| Claude Opus 4.6 | `anthropic.claude-opus-4-6-v1` | Yes | Yes | Yes | Yes | Yes |
156| Claude Fable 5.1 | `anthropic.claude-fable-5-1` | Yes | Yes | No | No | No |
157| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | `anthropic.claude-mythos-5-1` | Yes | Yes | No | No | No |
158| Claude Fable 5 | `anthropic.claude-fable-5` | Yes | Yes | No | No | No |
159| Claude Opus 5.5 | `anthropic.claude-opus-5-5` | Yes | Yes | Yes | Yes | Yes |
160| Claude Opus 5 | `anthropic.claude-opus-5` | Yes | Yes | Yes | No | Yes |
161| Claude Opus 4.8 | `anthropic.claude-opus-4-8` | Yes | Yes | Yes | Yes | Yes |
162| Claude Opus 4.7 | `anthropic.claude-opus-4-7` | Yes | Yes | Yes | Yes | Yes |
163| Claude Opus 4.6 | `anthropic.claude-opus-4-6-v1` | Yes | Yes | Yes | No | Yes |
170164| Claude Opus 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `anthropic.claude-opus-4-5-20251101-v1:0` | Yes | Yes | Yes | No | No |
171165| Claude Opus 4.1 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `anthropic.claude-opus-4-1-20250805-v1:0` | No | Yes | No | No | No |
172| Claude Sonnet 4.6 | `anthropic.claude-sonnet-4-6` | Yes | Yes | Yes | Yes | No |
173| Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `anthropic.claude-sonnet-4-5-20250929-v1:0` | Yes | Yes | Yes | Yes | No |
174| Claude Sonnet 4 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `anthropic.claude-sonnet-4-20250514-v1:0` | Yes | Yes | Yes | No | Yes |
175| Claude Haiku 4.5 | `anthropic.claude-haiku-4-5-20251001-v1:0` | Yes | Yes | Yes | No | No |
166| Claude Sonnet 5.5 | `anthropic.claude-sonnet-5-5` | Yes | Yes | Yes | No | Yes |
167| Claude Sonnet 5 | `anthropic.claude-sonnet-5` | Yes | Yes | Yes | No | Yes |
168| Claude Sonnet 4.6 | `anthropic.claude-sonnet-4-6` | Yes | Yes | Yes | Yes | Yes |
169| Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `anthropic.claude-sonnet-4-5-20250929-v1:0` | Yes | Yes | Yes | Yes | Yes |
170| Claude Haiku 5.5 | `anthropic.claude-haiku-5-5` | Yes | Yes | Yes | Yes | Yes |
171| Claude Haiku 4.5 | `anthropic.claude-haiku-4-5-20251001-v1:0` | Yes | Yes | Yes | Yes | Yes |
176172 
173The Claude Mythos models in the table are available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842).
174 
175In most AWS regions, a request that passes the base model ID with no prefix fails with an HTTP 400 error such as this one:
176 
177```text wrap
178Invocation of model ID anthropic.claude-opus-5 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.
179```
180 
181In place of the inference profile ID, you can pass its full ARN: `arn:aws:bedrock:{region}:{account-id}:inference-profile/{inference-profile-id}`.
182 
183AWS’s [Anthropic model cards](https://docs.aws.amazon.com/bedrock/latest/userguide/model-cards-anthropic.html) list inference profile IDs and the regions where each one works. A card can also show regions where the base model ID works on its own. AWS adds prefixes over a model’s life, so a card and the table can differ.
184 
185[Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations) defines the lifecycle terms (Deprecated, Retired). On partner-operated platforms, the partner sets lifecycle dates, which can differ from the Claude API schedule. For the current retirement date of any model on Amazon Bedrock, see [Amazon Bedrock’s model lifecycle page](https://docs.aws.amazon.com/bedrock/latest/userguide/model-lifecycle.html).
186 
177187### List available models
178188 
179The following examples show how to print a list of all the Claude models available through Bedrock:
189To print the inference profile IDs that you can call from a region, run `aws bedrock list-inference-profiles --region us-west-2`. Replace `us-west-2` with your region.
180190 
191The following examples print the base model IDs of all the Claude models available through Bedrock:
192 
181193<CodeGroup exclude="shell">
182194 ```bash AWS CLI
183195 aws bedrock list-foundation-models --region=us-west-2 --by-provider anthropic --query "modelSummaries[*].modelId"
from line 277
265277 import software.amazon.awssdk.services.bedrock.model.ListFoundationModelsResponse;
266278 import software.amazon.awssdk.services.bedrock.model.FoundationModelSummary;
267279 
268 public class ListAnthropicModels {
269 public static void main(String[] args) {
270 BedrockClient client = BedrockClient.builder()
271 .region(Region.US_WEST_2)
272 .build();
280 void main() {
281 BedrockClient client = BedrockClient.builder()
282 .region(Region.US_WEST_2)
283 .build();
273284 
274 ListFoundationModelsRequest request = ListFoundationModelsRequest.builder()
275 .byProvider("anthropic")
276 .build();
285 ListFoundationModelsRequest request = ListFoundationModelsRequest.builder()
286 .byProvider("anthropic")
287 .build();
277288 
278 ListFoundationModelsResponse response = client.listFoundationModels(request);
289 ListFoundationModelsResponse response = client.listFoundationModels(request);
279290 
280 for (FoundationModelSummary summary : response.modelSummaries()) {
281 System.out.println(summary.modelId());
282 }
283 
284 client.close();
291 for (FoundationModelSummary summary : response.modelSummaries()) {
292 IO.println(summary.modelId());
285293 }
294 
295 client.close();
286296 }
287297 ```
288298 
from line 482
472482 import com.anthropic.models.messages.Message;
473483 import com.anthropic.models.messages.MessageCreateParams;
474484 
475 public class BedrockExample {
485 void main() {
486 // Uses default AWS credential provider chain
487 AnthropicClient client = AnthropicOkHttpClient.builder()
488 .backend(BedrockBackend.fromEnv())
489 .build();
476490 
477 public static void main(String[] args) {
478 // Uses default AWS credential provider chain
479 AnthropicClient client = AnthropicOkHttpClient.builder()
480 .backend(BedrockBackend.fromEnv())
481 .build();
491 Message message = client
492 .messages()
493 .create(
494 MessageCreateParams.builder()
495 .model("global.anthropic.claude-opus-4-6-v1")
496 .maxTokens(256)
497 .addUserMessage("Hello, world")
498 .build()
499 );
482500 
483 Message message = client
484 .messages()
485 .create(
486 MessageCreateParams.builder()
487 .model("global.anthropic.claude-opus-4-6-v1")
488 .maxTokens(256)
489 .addUserMessage("Hello, world")
490 .build()
491 );
492 
493 System.out.println(message.content());
494 }
501 IO.println(message.content());
495502 }
496503 ```
497504 </Tab>
from line 557
550557 }
551558 )
552559 
553 response = bedrock.invoke_model(
554 body=body, modelId="global.anthropic.claude-opus-4-6-v1"
555 )
560 response = bedrock.invoke_model(body=body, modelId="global.anthropic.claude-opus-5-5")
556561 
557562 response_body = json.loads(response.get("body").read())
558563 print(response_body.get("content"))
from line 603
598603 )
599604 
600605 message = client.messages.create(
601 model="us.anthropic.claude-sonnet-4-5-20250929-v1:0",
606 model="us.anthropic.claude-opus-4-6-v1",
602607 max_tokens=1024,
603608 messages=[{"role": "user", "content": "Hello!"}],
604609 )
from line 621
616621 });
617622 
618623 const message = await client.messages.create({
619 model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
624 model: "us.anthropic.claude-opus-4-6-v1",
620625 max_tokens: 1024,
621626 messages: [{ role: "user", content: "Hello!" }]
622627 });
from line 644
639644 
640645 var response = await client.Messages.Create(new MessageCreateParams
641646 {
642 Model = "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
647 Model = "us.anthropic.claude-opus-4-6-v1",
643648 MaxTokens = 1024,
644649 Messages = [new() { Role = Role.User, Content = "Hello!" }],
645650 });
from line 671
666671 )
667672 
668673 message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
669 Model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
674 Model: "us.anthropic.claude-opus-4-6-v1",
670675 MaxTokens: 1024,
671676 Messages: []anthropic.MessageParam{
672677 anthropic.NewUserMessage(anthropic.NewTextBlock("Hello!")),
from line 692
687692 import com.anthropic.models.messages.MessageCreateParams;
688693 import software.amazon.awssdk.regions.Region;
689694 
690 // Option 1: Set AWS_BEARER_TOKEN_BEDROCK environment variable and use fromEnv()
691 AnthropicClient client = AnthropicOkHttpClient.builder()
692 .backend(BedrockBackend.fromEnv())
693 .build();
695 void main() {
696 // Option 1: Set AWS_BEARER_TOKEN_BEDROCK environment variable and use fromEnv()
697 AnthropicClient client = AnthropicOkHttpClient.builder()
698 .backend(BedrockBackend.fromEnv())
699 .build();
694700 
695 // Option 2: Provide the token programmatically
696 client = AnthropicOkHttpClient.builder()
697 .backend(BedrockBackend.builder()
698 .apiKey("your-bearer-token")
699 .region(Region.US_WEST_2)
700 .build())
701 .build();
701 // Option 2: Provide the token programmatically
702 client = AnthropicOkHttpClient.builder()
703 .backend(BedrockBackend.builder()
704 .apiKey("your-bearer-token")
705 .region(Region.US_WEST_2)
706 .build())
707 .build();
702708 
703 MessageCreateParams params = MessageCreateParams.builder()
704 .model("us.anthropic.claude-sonnet-4-5-20250929-v1:0")
705 .maxTokens(1024)
706 .addUserMessage("Hello!")
707 .build();
709 MessageCreateParams params = MessageCreateParams.builder()
710 .model("us.anthropic.claude-opus-4-6-v1")
711 .maxTokens(1024)
712 .addUserMessage("Hello!")
713 .build();
708714 
709 client.messages().create(params).content().stream()
710 .flatMap(block -> block.text().stream())
711 .forEach(textBlock -> System.out.println(textBlock.text()));
715 client.messages().create(params).content().stream()
716 .flatMap(block -> block.text().stream())
717 .forEach(textBlock -> IO.println(textBlock.text()));
718 }
712719 ```
713720 </Tab>
714721 
from line 732
725732 messages: [
726733 ['role' => 'user', 'content' => 'Hello!']
727734 ],
728 model: 'us.anthropic.claude-sonnet-4-5-20250929-v1:0',
735 model: 'us.anthropic.claude-opus-4-6-v1',
729736 );
730737 echo $message->content[0]->text;
731738 ```
from line 748
741748 )
742749 
743750 message = client.messages.create(
744 model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
751 model: "us.anthropic.claude-opus-4-6-v1",
745752 max_tokens: 1024,
746753 messages: [{role: "user", content: "Hello!"}]
747754 )
from line 775
768775 
769776* [Messages API](https://platform.claude.com/docs/en/api/messages/create)
770777* [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
778* [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) on [select models](https://platform.claude.com/docs/en/build-with-claude/token-counting#feature-availability), through Amazon Bedrock’s [`CountTokens` API](https://docs.aws.amazon.com/bedrock/latest/userguide/count-tokens.html) with an AWS SDK
771779* [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking)
772780* [Tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview), including the [Bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool), [Computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), [Memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool), and [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool)
773781* [Citations](https://platform.claude.com/docs/en/build-with-claude/citations)
from line 794
786794 
787795### Computer use and browser use toolsets on Bedrock
788796 
789The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets are available through the InvokeModel API for these models:
797The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets are available through the InvokeModel API on select models. Both toolsets work on the same models. For the list, see the entry for Amazon Bedrock (`bedrock-runtime`) in [Availability of the browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#feature-availability).
790798 
791* Claude Fable 5.2
792* Claude Mythos 5.2
793* Claude Fable 5.1
794* Claude Fable 5
795* Claude Opus 5.5
796* Claude Opus 5
797* Claude Opus 4.8
798* Claude Sonnet 5.5
799* Claude Sonnet 5
800* Claude Haiku 5.5
801 
802799To use one, add an entry of type `computer_toolset_20260801` or `browser_toolset_20260801` to the `tools` array. No beta header is required for either toolset.
803800 
804801### PDF support on Bedrock
from line 804
807804 
808805### Mid-conversation system messages on Bedrock
809806 
810[Mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) are available through the InvokeModel API for Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Sonnet 5.5, and Claude Haiku 5.5. This feature is not available on Claude Sonnet 5. Use the top-level `system` field instead. It is not available for the other models in the model table on this page.
807[Mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) are available through the InvokeModel API on select models. For the list, see the entry for Amazon Bedrock (`bedrock-runtime`) in [Availability of mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#feature-availability). This feature is not available on Claude Sonnet 5. Use the top-level `system` field instead.
811808 
812809A `role: "system"` message can also set `output_config.effort` to [change effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort-per-message) on Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, and Claude Opus 5.5. This is in beta: add `mid-conversation-output-config-2026-07-01` to the `anthropic_beta` array in the request body. Without that beta, or on Claude Fable 5, Claude Opus 5, or Claude Opus 4.8, the request returns a 400 error: `messages.N.output_config: Extra inputs are not permitted`. In the error, `N` is the index of the `system` message in `messages`.
813810 
from line 812
815812 
816813### Context window
817814 
818Claude Fable 5.2, Claude Mythos 5.2, Claude Fable 5.1, Claude Fable 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5.5, Claude Sonnet 5, Claude Sonnet 4.6, and Claude Haiku 5.5 have a [1M-token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) on Amazon Bedrock. Other Claude models, including Sonnet 4.5 (deprecated) and Sonnet 4 (deprecated), have a 200k-token context window.
815On `bedrock-runtime`, Claude 4.6 and later models have a [1M-token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows). Claude Opus 4.5, Claude Opus 4.1, Claude Sonnet 4.5, and Claude Haiku 4.5 have a 200k-token context window.
819816 
820817Bedrock limits request payloads to 20 MB. When sending large documents or many images, you might reach this limit before the token limit.
821818 
822819## Global versus regional endpoints
823820 
824Starting with **Claude Sonnet 4.5 and all future models**, Bedrock offers two endpoint types:
821Bedrock offers two endpoint types:
825822 
826823* **Global endpoints:** Dynamic routing for maximum availability
827824* **Regional endpoints:** Guaranteed data routing through specific geographic regions
828825 
829Regional endpoints include a 10 percent pricing premium over global endpoints.
826The table in [API model IDs](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy#api-model-ids) shows which endpoint types each model offers. The `global` prefix is the global endpoint. The other prefixes are regional endpoints, each named for its geography, such as `au` for Australia and `jp` for Japan.
830827 
831<Note>
832 This applies to Claude Sonnet 4.5 (deprecated) and future models only. Older models (Claude Sonnet 4 (deprecated) and earlier) maintain their existing pricing structures.
833</Note>
834 
835828### When to use each option
836829 
837830**Global endpoints (recommended):**
from line 838
845838 
846839* Route traffic through specific geographic regions
847840* Are required for data residency and compliance requirements
848* Are available for US, EU, Japan, and Asia-Pacific
849* Carry a 10 percent pricing premium that reflects infrastructure costs for dedicated regional capacity
841* Carry a 10 percent [pricing premium](https://platform.claude.com/docs/en/about-claude/pricing#cloud-platform-pricing) over global endpoints on Claude 4.5 and later models outside AWS GovCloud
850842 
851843### Implementation
852844 
853**Using global endpoints (default for Opus 4.6, Sonnet 4.6, and Sonnet 4.5 (deprecated)):**
845**Using global endpoints:**
854846 
855The model IDs for Claude Opus 4.6, Sonnet 4.6, and Sonnet 4.5 (deprecated) already include the `global.` prefix:
847To use global endpoints, add the `global.` prefix to the base model ID:
856848 
857849<Tabs>
858850 <Tab title="cURL">
from line 944
952944 import com.anthropic.client.okhttp.AnthropicOkHttpClient;
953945 import com.anthropic.models.messages.MessageCreateParams;
954946 
955 // Uses default AWS credential provider chain
956 AnthropicClient client = AnthropicOkHttpClient.builder()
957 .backend(BedrockBackend.fromEnv())
958 .build();
947 void main() {
948 // Uses default AWS credential provider chain
949 AnthropicClient client = AnthropicOkHttpClient.builder()
950 .backend(BedrockBackend.fromEnv())
951 .build();
959952 
960 var message = client
961 .messages()
962 .create(
963 MessageCreateParams.builder()
964 .model("global.anthropic.claude-opus-4-6-v1")
965 .maxTokens(256)
966 .addUserMessage("Hello, world")
967 .build()
968 );
953 var message = client
954 .messages()
955 .create(
956 MessageCreateParams.builder()
957 .model("global.anthropic.claude-opus-4-6-v1")
958 .maxTokens(256)
959 .addUserMessage("Hello, world")
960 .build()
961 );
962 }
969963 ```
970964 </Tab>
971965 
from line 1000
10061000 
10071001**Using regional endpoints (CRIS):**
10081002 
1009To use regional endpoints, replace the `global.` prefix with a regional prefix such as `us.`:
1003To use regional endpoints, replace the `global.` prefix with a regional prefix such as `us.`. Send the request to an AWS region that the prefix covers, such as `us-west-2` for `us.` or `ap-southeast-2` for `au.`:
10101004 
10111005<Tabs>
10121006 <Tab title="cURL">
from line 1103
11091103 import com.anthropic.client.okhttp.AnthropicOkHttpClient;
11101104 import com.anthropic.models.messages.MessageCreateParams;
11111105 
1112 // Uses default AWS credential provider chain
1113 AnthropicClient client = AnthropicOkHttpClient.builder()
1114 .backend(BedrockBackend.fromEnv())
1115 .build();
1106 void main() {
1107 // Uses default AWS credential provider chain
1108 AnthropicClient client = AnthropicOkHttpClient.builder()
1109 .backend(BedrockBackend.fromEnv())
1110 .build();
11161111 
1117 // Using US regional endpoint (CRIS)
1118 var message = client
1119 .messages()
1120 .create(
1121 MessageCreateParams.builder()
1122 .model("us.anthropic.claude-opus-4-6-v1") // Regional prefix
1123 .maxTokens(256)
1124 .addUserMessage("Hello, world")
1125 .build()
1126 );
1112 // Using US regional endpoint (CRIS)
1113 var message = client
1114 .messages()
1115 .create(
1116 MessageCreateParams.builder()
1117 .model("us.anthropic.claude-opus-4-6-v1") // Regional prefix
1118 .maxTokens(256)
1119 .addUserMessage("Hello, world")
1120 .build()
1121 );
1122 }
11271123 ```
11281124 </Tab>
11291125 
Feedback