View a markdown version of this page

gpt-oss-20b - Amazon Bedrock

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

gpt-oss-20b

OpenAI logo. OpenAI — gpt-oss-20b

モデルの詳細

GPT OSS 20B は OpenAI の 200 億パラメータのオープンソースモデルで、効率的なテキスト生成とコーディングをより低いコンピューティングコストで実現します。モデルの開発とパフォーマンスの詳細については、モデル/サービスカードを参照してください。

  • モデル開始日: 2025 年 8 月 5 日

  • EOL の期限: 2026 年 8 月 5 日

  • レガシー期間: 6 か月以上

  • モデルライフサイクルポリシー: モデルライフサイクル (2026 年 9 月 7 日より前にリリースされたモデルの場合)

  • モデル終了日: 該当なし

  • エンドユーザーライセンス契約と利用規約: 表示

  • モデルライフサイクル: アクティブ

  • コンテキストウィンドウ: 128K トークン

  • 最大出力トークン: 16K

  • 推論: デフォルトで でサポート (労力設定可能: low、medium、high)

入力モダリティ 出力モダリティ
not-supported オーディオnot-supported 埋め込み
not-supported イメージnot-supported イメージ
not-supported 音声not-supported 音声
supported テキストsupported テキスト
not-supported のビデオnot-supported のビデオ

サポートされているエンドポイントと APIs

以下の表は、gpt-oss-20b でサポートされているエンドポイントと APIs を示しています。詳細については、「Amazon Bedrock でサポートされている APIs」および「Amazon Bedrock でサポートされている推論エンドポイント」を参照してください。

エンドポイントのサポート

Endpoint サポート
bedrock-runtime supported
bedrock-mantle supported

bedrock-runtimeエンドポイントでサポートされている APIs

メッセージ レスポンス チャットの完了 Converse Invoke
not-supported not-supported supported supported supported
注記

ではbedrock-runtime、このモデルはモデル ID が のチャット完了をサポートしますがopenai.gpt-oss-20b-1:0、Responsions API はサポートしていません。このモデルで Responses API を使用するには、 bedrock-mantleおよび モデル ID を使用しますopenai.gpt-oss-20b。

bedrock-mantleエンドポイントでサポートされている APIs

メッセージ レスポンス チャットの完了 Converse Invoke
not-supported supported supported not-supported not-supported
注記

ではbedrock-mantle、両方の APIs ではなく/v1ベースパスを使用します/openai/v1。このモデルでいずれかの API を使用します。

  • レスポンスには、 を使用します/v1/responses。

  • チャットの完了には、 を使用します/v1/chat/completions。

ヒント

可能な限り、新しいアプリケーションには bedrock-runtimeエンドポイントを使用することをお勧めします。詳細については、「Amazon Bedrock でサポートされている推論エンドポイント」を参照してください。

機能と機能

Bedrock の機能

bedrock-mantleエンドポイントを使用してサポートされる機能

bedrock-runtimeエンドポイントを使用してサポートされる機能

料金

料金情報については、Amazon Bedrock の料金ページを参照してください。

プログラムによるアクセス

次のモデル IDs とエンドポイント URLsを使用して、このモデルにプログラムでアクセスします。使用可能な APIs「サポートされている APIs」と「サポートされているエンドポイント」を参照してください。

Endpoint モデル ID リージョン内エンドポイント URL 地理推論 ID グローバル推論 ID
bedrock-runtime openai.gpt-oss-20b-1:0 https://bedrock-runtime.{region}.amazonaws.com us-gov.openai.gpt-oss-20b-1:0 サポートされません
bedrock-mantle openai.gpt-oss-20b https://bedrock-mantle.{region}.api.aws/v1 サポートされません サポートされません

たとえば、region が us-east-1 (バージニア北部) の場合、bedrock-runtime エンドポイント URL は「https://bedrock-runtime.us-east-1.amazonaws.com」になり、bedrock-mantle の URL は「https://bedrock-mantle.us-east-1.api.aws/v1」になります。

サービス階層

Amazon Bedrock は、ワークロードの要件に合わせて複数のサービス層を提供します。Standard はpay-per-tokenアクセスを提供します ( フィールドを設定"service_tier": "default"または省略)。Priority は、料金プレミアム (設定 ) に対して最速の応答時間を提供します"service_tier": "priority"。Flex は、柔軟でnon-time-sensitiveワークロード (セット ) に低コストのアクセスを提供します"service_tier": "flex"。リザーブドは、予測可能なワークロードに対するコミットメントという用語を持つ専用スループットを提供します。これは、リクエストごとではなくアカウントレベルで設定されます (AWS アカウントチームに連絡して有効にしてください)。詳細については、「 サービス層」を参照してください。

スタンダード 優先度 Flex 予約済み
supported supported supported not-supported

リージョン別の利用可能性

リージョンの可用性の概要

Amazon Bedrock には 3 つの推論オプションがあります。In-Region は、厳格なコンプライアンスのために 1 つのリージョン内にリクエストを保持します。Geo Cross-Region は、データレジデンシーを尊重しながら、1 つのリージョン (米国、欧州、APAC など) 間でルーティングします。Global Cross-Region は、レジデンシーの制約がない世界中のどこでもルーティングします。詳細については、モデル別のリージョンの可用性「」ページを参照してください。

リージョン リージョン内 地域 グローバル
us-east-1 (バージニア北部)supportednot-supportednot-supported
us-east-2 (オハイオ)supportednot-supportednot-supported
us-west-2 (オレゴン)supportednot-supportednot-supported
eu-central-1 (フランクフルト)supportednot-supportednot-supported
eu-north-1 (ストックホルム)supportednot-supportednot-supported
eu-south-1 (ミラノ)supportednot-supportednot-supported
eu-west-1 (アイルランド)supportednot-supportednot-supported
eu-west-2 (ロンドン)supportednot-supportednot-supported
ap-northeast-1 (東京)supportednot-supportednot-supported
ap-south-1 (ムンバイ)supportednot-supportednot-supported
ap-southeast-2 (シドニー)supportednot-supportednot-supported
ap-southeast-3 (ジャカルタ)supportednot-supportednot-supported
sa-east-1 (サンパウロ)supportednot-supportednot-supported
ap-southeast-4 (メルボルン)supportednot-supportednot-supported
ap-northeast-2 (ソウル)supportednot-supportednot-supported
ap-southeast-1 (シンガポール)supportednot-supportednot-supported
us-gov-west-1 (GovCloud)supportednot-supportednot-supported

Geo CRIS 推論の詳細

米国 GovCloud CRIS

米国 GovCloud CRIS 推論 ID: us-gov.openai.gpt-oss-20b-1:0

ソースリージョン 送信先リージョン
us-gov-west-1 (GovCloud 西部)us-gov-west-1 (GovCloud West)、us-gov-east-1 (GovCloud East)
us-gov-east-1 (GovCloud 東部)us-gov-west-1 (GovCloud West)、us-gov-east-1 (GovCloud East)

クォータと制限

AWS アカウントには、サービスのパフォーマンスを維持し、Amazon Bedrock の適切な使用を確保するためのデフォルトのクォータがあります。アカウントに割り当てられたデフォルトのクォータは、リージョンの要因、支払い履歴、不正使用、および/またはクォータ引き上げリクエストの承認に応じて更新される場合があります。詳細については、Amazon Bedrock のクォータ「 ドキュメント」および「 モデルの制限」を参照してください。

サンプルコード

ステップ 1 - AWS アカウント: AWS アカウントがすでにある場合は、このステップをスキップします。を初めて使用する場合は AWS、AWS アカウントにサインアップします。

ステップ 2 - API キー: Amazon Bedrock コンソールに移動し、長期 API キーを生成します。

ステップ 3 - SDK を取得する: この入門ガイドを使用するには、Python がすでにインストールされている必要があります。次に、使用している APIs に応じて、関連するソフトウェアをインストールします。

レスポンスまたはチャット完了で、OpenAI SDK タブを選択します。Invoke または Converse で、Boto3 タブを選択します。

OpenAI SDK
pip install boto3 openai
Boto3
pip install boto3

ステップ 4 - 環境変数を設定する

認証に API キーを使用するように環境を設定します。

SDK とエンドポイントのタブを選択します。

bedrock-runtime
OPENAI_API_KEY="<provide your Bedrock API key>" OPENAI_BASE_URL="https://bedrock-runtime.<your-region>.amazonaws.com/openai/v1"
bedrock-mantle
OPENAI_API_KEY="<provide your Bedrock API key>" OPENAI_BASE_URL="https://bedrock-mantle.<your-region>.api.aws/v1"
Boto3
AWS_BEARER_TOKEN_BEDROCK="<provide your Bedrock API key>"

ステップ 5 - 最初の推論リクエストを実行する

ファイルを として保存する bedrock-first-request.py

bedrock-runtime: OpenAI SDK

ステップ 4 - 環境変数を設定する の設定を使用します。bedrock-runtime[] タブを選択します。このモデルは、このエンドポイントでチャット完了 API をサポートしていますが、レスポンス API はサポートしていません。

from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="openai.gpt-oss-20b-1:0", messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}] ) print(response)

bedrock-mantle

ステップ 4 - 環境変数を設定する の設定を使用します。bedrock-mantle[] タブを選択します。Chat タブは Chat Completions API を使用します。

Responses API
from openai import OpenAI client = OpenAI() response = client.responses.create( model="openai.gpt-oss-20b", input="Can you explain the features of Amazon Bedrock?" ) print(response)
Chat
from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="openai.gpt-oss-20b", messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}] ) print(response)

bedrock-runtime: Boto3

ステップ 4 - 環境変数を設定するの Boto3 設定を使用します。リクエストの API を選択します。

Invoke API
import json import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.invoke_model( modelId='openai.gpt-oss-20b-1:0', body=json.dumps({ '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='openai.gpt-oss-20b-1:0', messages=[ { 'role': 'user', 'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}] } ] ) print(response)