OpenAI
The gateway speaks the OpenAI API upstream and holds the OpenAI key.
| Property | Value |
|---|---|
| Provider id | openai |
| Gateway speaks | OpenAI REST → api.openai.com/v1 |
| Credential | API key (Bearer), server-held |
| Client base URL | OPENAI_BASE_URL → http://<gateway>:8787/v1 |
Add the key under Console → Providers → openai, or seed it from the environment with
ANYRAY_PROVIDER_KEY_OPENAI. Optional per-request fields (org, project, beta) ride the
x-anyray-openai-organization, x-anyray-openai-project, and x-anyray-openai-beta
headers.
Then point the SDK at the gateway (base URLs and keys):
export OPENAI_BASE_URL=http://<gateway>:8787/v1
# requests carry: x-anyray-provider: openai
Omit the provider header when OpenAI is your only configured provider. Models use OpenAI ids,
e.g. gpt-4o, gpt-4o-mini, o1-mini.