Quickstart
Install the gateway, add your provider keys, and call a Claude model from the OpenAI SDK.
This runs the 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.
Set up with your coding agent
Paste this prompt into Claude Code, Cursor, Codex, or any coding agent:
Help me set up the open-source Respan Gateway: fetch and follow https://www.respan.ai/docs/oss-gateway/agent-setup.mdTo do it yourself, follow the steps below.
Step by step
Install
pip install respan-gatewayThis installs the respan-gateway command. To use cargo, a release binary or Docker instead, see Install.
respan-gateway --versionAdd your provider keys
Export a key for each provider you want to use:
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."The release binary and the Docker image also read the nearest .env file in the current directory or its parents, with variables already set in your shell winning over it. The command the pip package installs doesn’t read .env yet, so export the keys in your shell. Other vendors use their own variables, such as GEMINI_API_KEY or GROQ_API_KEY; see Providers.
Start the gateway
respan-gatewayIt listens on 127.0.0.1:8080 and prints the providers it found, the endpoints it serves, and the web UI’s address. To use another address, pass --listen, such as --listen 9000.
Make a call
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-luna",
"messages": [{"role": "user", "content": "Say hello"}]
}'With no client keys set, any API key value works, and the gateway only answers on loopback. To require keys, see Client keys.
Open the web UI
Open localhost:8080/ui/ . The request log shows each call with its provider, model, latency, tokens and cost.
To add routes, tools and tracing, run respan-gateway init to write a commented gateway.toml from the keys in your environment, and respan-gateway check to validate it. See Config file.