View a markdown version of this page

克劳德十四行诗 5 - Amazon Bedrock

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

克劳德十四行诗 5

带有白色径向加载或进度指示符号的橙色圆形方形图标。 人类 — 克劳德十四行诗 5

模型详细信息

Claude Sonnet 5 是 Anthropic 最强大的十四行诗模型,专为大规模编程、代理和专业工作而打造。它为每天运行的模型团队带来了接近OPUS的情报,同时团队已经依赖Sonnet在能力、成本和速度方面取得了同样的平衡。

  • 模型发布日期:2026 年 6 月 30 日

  • 模特停产日期: N/A

  • 最终用户许可协议和使用条款:Third-party 示范条款

  • 模型生命周期:活跃

  • 上下文窗口:100 万个代币

  • 最大输出代币:128K

  • 推理:支持(自适应思维始终处于启用状态,无法禁用;工作量水平可配置)

  • 知识截止日期:2026 年 1 月

  • 商城产品编号:prod-4ezhkeia6k2cs

输入模式 输出模式 支持的 API 支持的终端节点
Red circle with white X icon indicating error, cancel, or close action.音频Red circle with white X icon indicating error, cancel, or close action.嵌入Red circle with white X icon indicating error, cancel, or close action. ResponsesGreen circle with white checkmark icon. bedrock-runtime
Green circle with white checkmark icon.图片Red circle with white X icon indicating error, cancel, or close action.图片Red circle with white X icon indicating error, cancel, or close action. Chat CompletionsGreen circle with white checkmark icon. bedrock-mantle
Red circle with white X icon indicating error, cancel, or close action.演讲Red circle with white X icon indicating error, cancel, or close action.演讲Green circle with white checkmark icon. Invoke
Green circle with white checkmark icon.文本Green circle with white checkmark icon.文本Green circle with white checkmark icon. Converse
Red circle with white X icon indicating error, cancel, or close action.视频Red circle with white X icon indicating error, cancel, or close action.视频Green circle with white checkmark icon. Messages
提示

只要有可能,我们建议将bedrock-runtime终端节点用于新应用程序。有关详细信息,请参阅亚马逊 Bedrock 支持的终端节点

能力和特性

基岩特征

使用bedrock-runtime终端节点支持的功能

使用bedrock-mantle终端节点支持的功能

提示缓存

有关更多信息,请参阅提示缓存以加快模型推断

支持即时缓存 每个缓存检查点的最小令牌 每个请求的最大缓存检查点数 支持的 TTL 接受提示缓存检查点的字段
4,096 4 5 分钟,1 小时 systemmessagestools

计算机使用情况bedrock-runtimebedrock-mantle终端节点

有关更多信息,请参阅计算机使用

刀具类型 测试版标题
computer_20251124 computer-use-2025-11-24

定价

有关定价,请参阅亚马逊基岩定价页面。

以编程方式访问

使用以下模型 ID 和端点 URL 以编程方式访问此模型。有关可用 API 和终端节点的更多信息,请参阅支持的 API 和支持的终端节点

Endpoint 模特 ID In-Region 端点 URL 地理推断 ID 全局推理 ID
bedrock-runtime anthropic.claude-sonnet-5 N/A

us.anthropic.claude-sonnet-5

eu.anthropic.claude-sonnet-5

au.anthropic.claude-sonnet-5

global.anthropic.claude-sonnet-5
bedrock-mantle anthropic.claude-sonnet-5 https://bedrock-mantle.{region}.api.aws/anthropic/v1/messages N/A N/A

例如,如果区域为 us-east-1(弗吉尼亚北部),则基岩运行时终端节点 URL 为 “”,基岩地堡端点 URL 为 https://bedrock-runtime.us-east-1.amazonaws.com “”。https://bedrock-mantle.us-east-1.api.aws/anthropic/v1/messages

服务等级

Amazon Bedrock 提供多个服务等级以满足您的工作负载要求。Standard 提供按代币付费的访问权限,无需承诺(设置"service_tier": "default"或省略该字段)。Priority 以溢价(套装"service_tier": "priority")提供最快的响应时间。Flex 为灵活、非时间敏感的工作负载(套装)提供更低成本的访问权限。"service_tier": "flex"预留为可预测的工作负载提供专用吞吐量和期限承诺;它是在账户级别设置的,而不是根据每个请求设置的(请联系您的 AWS 账户团队来启用)。有关更多信息,请参阅服务等级

Standard 优先级 Flex 已保留
Green circle with white checkmark icon. Red circle with white X icon indicating error, cancel, or close action. Red circle with white X icon indicating error, cancel, or close action. Red circle with white X icon indicating error, cancel, or close action.

区域可用性

区域可用性一览

亚马逊 Bedrock 提供三种推理选项:

  • In-Region将请求保留在单个区域内以严格合规。

  • 在尊重数据驻留权的前提下,在地理位置(例如美国、欧盟和亚太地区)内跨区域进行地理 Cross-Region路由。

  • 在没有居住限制的情况下,全球 Cross-Region航线遍布世界任何地方。

有关更多详细信息,请参阅按型号划分的区域可用性页面。

区域 In-Region 地理 Global
us-east-1(弗吉尼亚北部)Green circle with white checkmark icon.Green circle with white checkmark icon.Green circle with white checkmark icon.
us-east-2(俄亥俄州)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
us-west-1(加利福尼亚北部)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
us-west-2(俄勒冈)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
ca-central-1(加拿大)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
ca-west-1(卡尔加里)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-central-1(法兰克福)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-central-2(苏黎世)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-north-1(斯德哥尔摩)Green circle with white checkmark icon.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-south-1(米兰)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-south-2(西班牙)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-west-1(爱尔兰)Green circle with white checkmark icon.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-west-2(伦敦)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
eu-west-3(巴黎)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
ap-east-2(台北)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-northeast-1(东京)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-northeast-2(首尔)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-northeast-3(大阪)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-south-1(孟买)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-south-2(海得拉巴)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-1(新加坡)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-2(悉尼)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-3(雅加达)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-4(墨尔本)Green circle with white checkmark icon.Green circle with white checkmark icon.Green circle with white checkmark icon.
ap-southeast-5(马来西亚)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-6(新西兰)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-7(泰国)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
il-central-1(特拉维夫)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
me-central-1(阿联酋)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
me-south-1(巴林)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
af-south-1(开普敦)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
sa-east-1(圣保罗)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
mx-central-1(墨西哥)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
us-gov-west-1(GovCloud 西部)Green circle with white checkmark icon.Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.
us-gov-east-1(GovCloud 东部)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.

数据驻留

  • 美国地理 (us.anthropic.claude-sonnet-5):将数据保存在美国和加拿大区域内。

  • 欧盟地理位置 (eu.anthropic.claude-sonnet-5):将数据保留在欧盟区域内。

  • AU geo (au.anthropic.claude-sonnet-5):将数据保留在澳大利亚区域内。

  • 全球 (global.anthropic.claude-sonnet-5):无居住限制的全球航线。

配额和限制

您的 AWS 账户有亚马逊 Bedrock 的默认配额。这些配额可能会根据地区因素、付款历史记录或配额增加请求的批准情况而变化。有关更多详细信息,请参阅Amazon Bedrock 的配额和模型限制。

示例代码

第 1 步- AWS 账户:如果您已经有 AWS 账户,请跳过此步骤。如果您是新手 AWS,请注册一个 A WS 账户

第 2 步-API 密钥:打开亚马逊 Bedrock 控制台并生成长期 API 密钥。

第 3 步-获取 SDK:要使用此入门指南,必须已安装 Python。然后根据您使用的 API 安装相关软件。

Messages API
pip install -U "anthropic[bedrock]"
Invoke/Converse API
pip install boto3

第 4 步-设置环境变量:将您的环境配置为使用 API 密钥进行身份验证。

Messages API
AWS_BEARER_TOKEN_BEDROCK="<provide your Bedrock API key>"
Invoke/Converse API
AWS_BEARER_TOKEN_BEDROCK="<provide your Bedrock API key>"

第 5 步-运行您的第一个推理请求:将文件另存为 bedrock-first-request.py

Messages API
from anthropic import AnthropicBedrockMantle client = AnthropicBedrockMantle(aws_region="us-east-1") message = client.messages.create( model="anthropic.claude-sonnet-5", max_tokens=1024, messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}], ) print(message.content[0].text)
Invoke API
import json import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.invoke_model( modelId='anthropic.claude-sonnet-5', body=json.dumps({ 'anthropic_version': 'bedrock-2023-05-31', 'messages': [{ 'role': 'user', 'content': 'Can you explain the features of Amazon Bedrock?'}], 'max_tokens': 1024 }) ) print(json.loads(response['body'].read()))
Converse API
import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.converse( modelId='anthropic.claude-sonnet-5', messages=[ { 'role': 'user', 'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}] } ] ) print(response)