> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Zed with the AI Gateway

> Connect the Zed editor's agent panel to the ngrok AI Gateway as an OpenAI-compatible provider to use catalog or self-hosted models.

[Zed](https://zed.dev) is a code editor with a built-in agent panel.
It reaches the AI Gateway as an OpenAI-compatible LLM provider, so the agent panel can use any model you list in your settings.

## What you'll need

* [Zed](https://zed.dev/download) installed.
* An [access key](https://ngrok.com/docs/ai-gateway/concepts/access-keys.md) from [app.ngrok.ai](https://app.ngrok.ai).

## Add the gateway as a provider

Add the provider to your Zed `settings.json`:

```json theme={"theme":{"light":"css-variables","dark":"css-variables"}}
{
  "language_models": {
    "openai_compatible": {
      "ngrok": {
        "api_url": "https://gateway.ngrok.ai/v1",
        "available_models": [
          {
            "name": "gpt-5.5",
            "display_name": "GPT-5.5 (via ngrok)",
            "max_tokens": 1050000
          },
          {
            "name": "claude-sonnet-5-5",
            "display_name": "Claude Sonnet 5.5 (via ngrok)",
            "max_tokens": 1000000
          }
        ]
      }
    }
  }
}
```

For each model:

* `name` is the model name Zed sends to the gateway: a model ID from the [model catalog](https://ngrok.com/docs/ai-gateway/reference/model-catalog.md), or `provider:model` to pin a provider
* `max_tokens` is the model's context window
* `capabilities` is optional; set `"images": true` inside it for models that accept images

Next, add your access key through the Zed UI.
Open the command palette, run **agent: open settings**, select **LLM Providers**, then **Configure**, find **ngrok** in the provider list, paste your access key, and press **Enter**.

## Test the connection

Create a new agent thread, pick one of your models from the selector at the bottom of the agent panel's message editor, and send a prompt:

Explain what a hash map is in two sentences.

Explain what a hash map is in two sentences.

Confirm the request in AI Gateway [observability](https://ngrok.com/docs/ai-gateway/observability.md) in [app.ngrok.ai](https://app.ngrok.ai).

## Use a model you run yourself

To reach a model on your own machine, register it as a [custom provider](https://ngrok.com/docs/ai-gateway/concepts/custom-providers.md), then add its `provider:model` name to `available_models`, such as `ollama:llama3.2`.
See [Use a model you run yourself](https://ngrok.com/docs/ai-gateway/guides/use-a-model-you-run-yourself.md) for the full setup.

## Next steps

* [Restrict providers and models](https://ngrok.com/docs/ai-gateway/guides/restrict-providers-and-models.md): Scope what an access key can call
* [Configure fallback models](https://ngrok.com/docs/ai-gateway/guides/configure-fallback-models.md): Try another model when the first one fails
* [Observability](https://ngrok.com/docs/ai-gateway/observability.md): See which model served each request


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.