We have model deployed behind API gateway and I exported API key and base url environment variables.
Step 1 - Setup API Key and Base URL to model deployed behind API gateway
export OPENAI_API_KEY=<CUSTOM API KEY> export
OPENAI_API_BASE`=
Step 2 - Setup SSL certs and request headers
Step 3 - Create a agent
from agents import Agent, Runner
agent = Agent(name=“Assistant”, instructions=“You are a helpful assistant”)
result = Runner.run_sync(agent, “Write a haiku about recursion in programming.”)
print(result.final_output)
How to pass custom request headers, SSL certs to open AI agent SDK ?