OpenAI SDK (gateway)
OpenAI SDK (gateway)
Route OpenAI SDK calls through the Respan gateway to use 250+ models from different providers. Only your RESPAN_API_KEY is needed — no separate provider keys required.
Setup
Switch models
Change the model parameter to use 250+ models from different providers through the same gateway.
See the full model list.
Prompt management
Use Respan prompt management to serve prompt templates from the platform. Use schema_version: 2 for all new integrations.
Chat Completions
Prompt messages are the base layer (system/context). Body messages are appended as runtime user turns.
Responses API
Only use the Responses API after confirming it is enabled for your Respan key. Live verification with a standard Respan gateway key returned a provider-credential error on /api/responses; the setup example above uses Chat Completions.
For the Responses API, pass prompt config under respan_params. The prompt template becomes instructions and body input is preserved.
Respan parameters
Pass additional Respan parameters via extra_body for gateway features.
See Respan params & metadata for the full list.