> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.respan.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://www.respan.ai/docs/_mcp/server.

# Quickstart

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.

#### Install the binary

Download the build for your platform from [GitHub Releases](https://github.com/respanai/respan-gateway/releases) and put it on your `PATH`. Set `VERSION` to the release you want.

#### macOS (Apple silicon)

```bash
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/
```

#### macOS (Intel)

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

#### Linux (x86_64)

```bash
VERSION=v0.1.0
curl -fsSL "https://github.com/respanai/respan-gateway/releases/download/$VERSION/respan-gateway-$VERSION-x86_64-unknown-linux-gnu.tar.gz" | tar xz
sudo mv "respan-gateway-$VERSION-x86_64-unknown-linux-gnu/respan-gateway" /usr/local/bin/
```

#### Linux (arm64)

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

#### Windows

Download `respan-gateway-<version>-x86_64-pc-windows-msvc.zip` from the release, unzip it, and add the folder that holds `respan-gateway.exe` to your `PATH`.

#### From source

With [Rust](https://rust-lang.org/tools/install/) 1.88 or later:

```bash
cargo install --git https://github.com/respanai/respan-gateway respan-gateway
```

A build from source has no web UI unless you build it first; see the [repository README](https://github.com/respanai/respan-gateway#install).

Check it:

```bash
respan-gateway --version
```

#### 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.

```bash
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](https://platform.respan.ai/platform/gateway/api-keys) as `RESPAN_API_KEY` instead. Calls then use your [Respan credits](/docs/documentation/admin/credits-billing) or the [provider keys](/docs/documentation/admin/llm-provider-keys) you added to Respan.

#### Start the gateway

```bash
respan-gateway
```

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

```text
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.

#### 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.

#### OpenAI SDK → Claude

```python
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)
```

#### Anthropic SDK → GPT

```python
from anthropic import Anthropic

client = Anthropic(base_url="http://localhost:8080", api_key="unused")
message = client.messages.create(
    model="gpt-5.5",
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(message.content[0].text)
```

#### Google GenAI SDK → Claude

```python
from google import genai

client = genai.Client(api_key="unused", http_options={"base_url": "http://localhost:8080"})
response = client.models.generate_content(
    model="claude-sonnet-4-5-20250929",
    contents="Hello!",
)
print(response.text)
```

#### curl

```bash
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "gemini-3.6-flash", "messages": [{"role": "user", "content": "Hello!"}]}'
```

`api_key` can be any value until you set [client keys](/docs/gateway/open-source/configure#client-keys). To send a model to a specific provider, prefix it: `openai/gpt-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](/docs/_fern-img/f96f0722550ca02c0e592fd51e77cb314269e702730153f27527914c5b8c6e6c.webp)![The gateway's Requests page listing recent requests with model, provider, status and latency](/docs/_fern-img/c2d16b257730679df22af91b162f84670e92963afd24ebbf945a3b61994c31f3.webp)

## Save a config file

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

```bash
respan-gateway init
```

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

```bash
respan-gateway check
respan-gateway
```

See [Configure plugins](/docs/gateway/open-source/configure) for every option.