Open
Description
Please read this first
- Have you read the docs?Agents SDK docs
- Have you searched for related issues? Others may have had similar requests
Question
The following code uses the openai api to call the text2image function. How to convert this method to openai-agents to call it?
client = OpenAI(
base_url="openai.com",
api_key=os.environ.get("openai_key"),
)
response = client.images.generate(
model="gpt-image-1",
prompt="Fisheye lens, a cat's head, the picture shows the cat's facial features are distorted due to the shooting method.",
size="1024x1024",
response_format="url"
)
print(response.data[0].url)