openai/openai-python

Public

mirrored fromhttps://github.com/openai/openai-pythonAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
dev/hayden/bedrock-aws-auth

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

examples/bedrock.py

15lines · modecode

1from openai import OpenAI
2from openai.providers import bedrock
3
4client = OpenAI(
5 provider=bedrock(
6 region="us-west-2",
7 )
8)
9
10response = client.responses.create(
11 model="openai.gpt-5.4",
12 input="Say hello!",
13)
14
15print(response.output_text)
16