---
title: Zed
---


[Zed](https://zed.dev) is a high-performance code editor written in Rust, with a built-in AI assistant. You configure OpenAI-compatible providers in `settings.json`, so pointing the endpoint at CrossModel lets you use the whole catalog inside the editor.

## Quickstart

### 1. Create an API key

Sign in to the [Console](/console/api-keys) and create a key that starts with `cm-` on the **API Keys** page. The key is shown only once, so copy it somewhere safe.

### 2. Edit settings.json

Press `Cmd+,` (macOS) or `Ctrl+,` (Linux) to open settings, or run `zed: open settings` from the command palette, and add:

```json
{
  "language_models": {
    "openai_compatible": {
      "CrossModel": {
        "api_url": "https://api.crossmodel.ai/v1",
        "available_models": [
          {
            "name": "deepseek/deepseek-v4-pro",
            "display_name": "DeepSeek V4 Pro",
            "max_tokens": 65536
          },
          {
            "name": "anthropic/claude-sonnet-4.6",
            "display_name": "Claude Sonnet 4.6",
            "max_tokens": 200000
          }
        ]
      }
    }
  }
}
```

**Field reference:**

| Field | Meaning |
|-------|---------|
| `"CrossModel"` | the provider's display name in Zed's UI; you can change it |
| `api_url` | `https://api.crossmodel.ai/v1` |
| `name` | the CrossModel model ID (`vendor/short_name` format) |
| `display_name` | the label shown in Zed's model selector |
| `max_tokens` | the model's context window size |

### 3. Set the API key environment variable

Zed doesn't store the API key in the config file — it reads it from an environment variable. The name is the provider name, uppercased, with `_API_KEY` appended.

For the provider name `"CrossModel"`, that's `CROSSMODEL_API_KEY`:

**macOS / Linux (add to `~/.zshrc` or `~/.bashrc`):**

```bash
export CROSSMODEL_API_KEY=cm-YOUR_KEY
```

**Windows (PowerShell):**

```powershell
$env:CROSSMODEL_API_KEY = "cm-YOUR_KEY"
```

Restart Zed so the environment variable takes effect.

### 4. Choose a model

Open Zed's AI panel (`Cmd+?` or the right sidebar), click the model selector, and pick a model under `CrossModel` to get started.

## Adding more models

Just append more objects to the `available_models` array. Find the full list of model IDs and context window sizes in the [model catalog](/models).

## Troubleshooting

| Symptom | What to check |
|---------|---------------|
| CrossModel missing from the model selector | Make sure `settings.json` is valid (no trailing commas), then restart Zed after saving. |
| Auth failure (401) | Confirm `CROSSMODEL_API_KEY` is set correctly and that Zed has been restarted. |
| "Model not found" | Check that the `name` field's casing matches the [model catalog](/models). |
| Insufficient balance | Top up in the [Console](/console/billing). |
