Skip to main content
init() points the OpenAI client at the gateway for you — use the SDK exactly as you do today.

How a bare OpenAI() reaches Orbitrage

You don’t pass a base_urlinit() does it for you. On init() the SDK patches the OpenAI / AsyncOpenAI constructor so that, when you don’t supply your own base_url, every client you build:
  1. gets base_url = https://api.orbitrage.ai/v1, and
  2. is authenticated with your orb_ key — even if OPENAI_API_KEY is set in your environment. (The gateway only accepts orb_ keys; your provider keys never leave your machine.)
So a plain OpenAI() always comes to Orbitrage with the right key:
If you pass your own base_url, Orbitrage never overrides it — you stay in control.

Managed tools

Reference a managed tool by name and Orbitrage runs it server-side — no keys, no tool loop:
  • model: "auto" routes to the cheapest capable model. Any model id pins it.
  • Streaming, tools, and vision all work unchanged — see Tool calling and Streaming.