Skip to navigation

Quickstart

Install the binary, add your provider keys, and call any model from any SDK.

This runs respan-gateway on your machine with no config file. Every provider key in your environment becomes a provider, and the model name in each request decides where it goes.

1

Install the binary

Download the build for your platform from GitHub Releases and put it on your PATH. Set VERSION to the release you want.

VERSION=v0.1.0
curl -fsSL "https://github.com/respanai/respan-gateway/releases/download/$VERSION/respan-gateway-$VERSION-aarch64-apple-darwin.tar.gz" | tar xz
sudo mv "respan-gateway-$VERSION-aarch64-apple-darwin/respan-gateway" /usr/local/bin/

Check it:

respan-gateway --version
2

Add your provider keys

Export a key for each provider you want to use. The gateway also reads them from a .env file in the current directory or a parent.

export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GEMINI_API_KEY="..."

To reach 1000+ models with one key, export your Respan API key as RESPAN_API_KEY instead. Calls then use your Respan credits or the provider keys you added to Respan.

3

Start the gateway

respan-gateway

It prints the providers it found, the endpoints it serves and a request to try:

respan-gateway 0.1.0 listening on 127.0.0.1:8080
config environment
providers openai openai-chat, openai-responses, openai-realtime, ...
gemini gemini-generate, openai-chat, gemini-live, ...
endpoints POST /v1/chat/completions
POST /v1/messages
...
web ui http://127.0.0.1:8080/ui/
auth off: no client keys

Leave it running. With no client keys it answers only on your machine.

4

Call any model from any SDK

Point your SDK’s base URL at the gateway and name any model. The gateway translates the request to that model’s provider.

from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="unused")
response = client.chat.completions.create(
model="claude-sonnet-4-5-20250929",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

api_key can be any value until you set client keys. To send a model to a specific provider, prefix it: openai/gpt-5.5.

5

Watch your requests

Open http://localhost:8080/ui/requests. Each request shows its model, the provider that answered, latency, tokens and cost. Click one to see its details.

The gateway's Requests page listing recent requests with model, provider, status and latency

Save a config file

To turn on plugins such as routing, MCP tools or Respan tracing, write a gateway.toml:

respan-gateway init

It writes a commented starter from the keys in your environment. Edit it, check it, and start the gateway again:

respan-gateway check
respan-gateway

See Configure plugins for every option.