# Zed setup

Zed's agent panel can use any OpenAI-compatible API. Point its OpenAI provider at Claudech and list the models you want.

## Before you start

- **A Claudech API key** from [API keys](https://claudech.com/api-keys). API access unlocks after your first purchase.

## Configuration

Add this to `~/.config/zed/settings.json` (open it with **zed: open settings**):

```json
{
  "language_models": {
    "openai": {
      "api_url": "https://api.claudech.com/v1",
      "available_models": [
        { "name": "claude-opus-5-5", "display_name": "Claude Opus 5.5", "max_tokens": 1000000, "max_output_tokens": 65536 },
        { "name": "claude-fable-5-1", "display_name": "Claude Fable 5.1", "max_tokens": 1000000, "max_output_tokens": 131072 },
        { "name": "claude-sonnet-5", "display_name": "Claude Sonnet 5", "max_tokens": 1000000, "max_output_tokens": 32768 }
      ]
    }
  }
}
```

`max_tokens` is the context window and `max_output_tokens` the longest reply; the values above match the [Models](https://claudech.com/docs/models) page.

Then open the agent panel's settings, find the **OpenAI** provider and paste your `sk-...` key. Pick a Claudech model from the model selector.

## Troubleshooting

| Symptom | Fix |
| --- | --- |
| `401` or "invalid API key" | Re-enter the key in the OpenAI provider settings |
| Models do not appear | Check the JSON is valid and `api_url` is exactly `https://api.claudech.com/v1` |
| `404 model_not_found` | `name` must be the Claudech model id exactly |
| `402 insufficient_balance` | Top up under [Billing](https://claudech.com/billing) |

See [all integrations](https://claudech.com/docs/integrations) for other editors. Claudech is an independent service and is not affiliated with the makers of Zed.

---

Source: https://claudech.com/docs/integrations/zed
