Skip to main content

OpenAI

The gateway speaks the OpenAI API upstream and holds the OpenAI key.

PropertyValue
Provider idopenai
Gateway speaksOpenAI REST → api.openai.com/v1
CredentialAPI key (Bearer), server-held
Client base URLOPENAI_BASE_URLhttp://<gateway>:8787/v1

Add the key under Console → Providersopenai, 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.