Skip to Content

Gateway quickstart

Call any model through one endpoint with your Respan API key.

Paste this into your coding agent, or follow the setup below:

Help me set up the Respan gateway: fetch and follow https://www.respan.ai/docs/ai-gateway/quickstart.md

Setup

Create a key in Gateway › API keys , set it as RESPAN_API_KEY, and point your SDK at the gateway:

Terminal
curl https://gateway.respan.ai/chat/completions \ -H "Authorization: Bearer $RESPAN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": "Hello!"}]}'

Change model to any ID on respan.ai/models . Calls are paid from your Respan credits, or by your provider if you bring your own key.

Migrate from another provider or gateway

Most apps only change the base URL and the API key.

Keep the OpenAI SDK. Change the base URL and use your Respan API key. OpenAI model IDs stay the same, such as gpt-5.5.

Python
# Before client = OpenAI(api_key=os.environ["OPENAI_API_KEY"]) # After client = OpenAI(base_url="https://gateway.respan.ai", api_key=os.environ["RESPAN_API_KEY"])

To keep paying OpenAI directly, save your OpenAI key with BYOK.

Logs

Every call shows up in Logs with its model, provider, tokens, latency, and cost.

Gateway Logs listing the latest requests, newest first, with time, log ID, span name, model, system, and user message

Using a framework or coding agent? See Integrations.