Skip to main content
Keep the official openai package: change the base URL, use your AI Reserve API key, and every gateway model — not just GPT — answers the same call.

Fallback models

Send an ordered list and the gateway tries the next model when the one before it fails. models is shorthand for model + fallbacks; the Python SDK takes gateway extensions through extra_body.
Which model answered, how entries are policy-checked, and how this interacts with your organization’s portal defaults: Fallback models.

Vercel AI SDK (and other OpenAI-compatible providers)

Migrating an existing OpenAI codebase? The Migrating from OpenAI guide covers the full concept mapping — keys, error shapes, and what carries over verbatim.