View a markdown version of this page

概觀 - Amazon Bedrock

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

概觀

Amazon Bedrock 是一項全受管服務,提供來自領導 AI 公司的高效能基礎模型的安全企業級存取權,讓您能夠建置和擴展生成式 AI 應用程式。

快速指南

閱讀 快速指南,在五分鐘內使用 Amazon Bedrock 撰寫您的第一個 API 呼叫。對於新應用程式,我們建議使用 bedrock-runtime端點。

Messages API
from anthropic import Anthropic from aws_bedrock_token_generator import provide_token token = provide_token(region="us-east-1") client = Anthropic( base_url="https://bedrock-runtime.us-east-1.amazonaws.com/anthropic", api_key=token, ) response = client.messages.create( model="global.anthropic.claude-opus-4-7", max_tokens=1024, messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}] ) print(response)
Responses API
from openai import OpenAI client = OpenAI() response = client.responses.create( model="global.openai.gpt-5.6-sol", input="Can you explain the features of Amazon Bedrock?" ) print(response)
Chat Completions API
from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="global.openai.gpt-5.6-sol", messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}] ) print(response)
Converse API
import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.converse( modelId='anthropic.claude-opus-4-7', messages=[ { 'role': 'user', 'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}] } ] ) print(response)
Invoke API
import json import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.invoke_model( modelId='anthropic.claude-opus-4-7', 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()))

Amazon Bedrock 支援來自業界領導供應商的 100 多種基礎模型,包括 Amazon、Anthropic、DeepSeek、Moonshot AIMiniMax、、 OpenAI和 xAI。

Amazon 標誌。

Amazon Nova

人類標誌。

Claude

DeepSeek 標誌。

DeepSeek

月亮 AI 標誌。

金比

MiniMax 標誌。

MiniMax

OpenAI 標誌。

OpenAI

xAI 標誌。

xAI

新增內容

開始建置

具有雙向箭頭的雲端圖示,指出同步或資料傳輸。

探索 Amazon Bedrock 支援的 APIs 和端點。

紫色背景上的扳手和螺絲起子圖示。

使用 Amazon Bedrock 提供的提出推論請求操作建置 。

Amazon Bedrock 模型自訂選項,包括微調、持續預先訓練和分割。

自訂模型,以改善其針對使用案例的效能