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

# Zed (gateway)

> Set up the Zed editor's agent with the Respan gateway.

Route [Zed](https://zed.dev)'s agent and assistant requests through the Respan gateway for automatic logging, caching, and model switching. Zed supports OpenAI-compatible providers in `settings.json`, so only your `RESPAN_API_KEY` is needed.

## Setup

#### Add Respan as a provider

Open your Zed settings (`zed: open settings`) and add an `openai_compatible` provider:

```json
{
  "language_models": {
    "openai_compatible": {
      "respan": {
        "api_url": "https://api.respan.ai/api/v1",
        "available_models": [
          {
            "name": "gpt-4o",
            "display_name": "GPT-4o via Respan",
            "max_tokens": 128000,
            "capabilities": { "tools": true, "images": true }
          },
          {
            "name": "claude-sonnet-4-5-20250929",
            "display_name": "Claude Sonnet 4.5 via Respan",
            "max_tokens": 200000,
            "capabilities": { "tools": true, "images": true }
          }
        ]
      }
    }
  }
}
```

Zed appends `/chat/completions` to `api_url`, so keep the `/v1` suffix.

#### Enter your API key

Open the **Agent Panel**, click the settings icon, find the **respan** provider, and paste `YOUR_RESPAN_API_KEY`. Zed also reads it from the `RESPAN_API_KEY` environment variable, which it derives from the provider name. Do not put the key in `settings.json`.

No separate provider key needed. The Respan gateway handles provider authentication.

#### Pick a model

Open the model picker in the Agent Panel and select one of the models you listed under **respan**. All LLM calls now route through Respan.

## Switch models

Add more entries to `available_models` to use any of the 1000+ models available through the gateway.

```text
gpt-4o
claude-sonnet-4-5-20250929
gemini/gemini-3.5-flash
```

See the [full model list](https://platform.respan.ai/platform/models).