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

# Zed

> Use Concentrate models in Zed's agent panel with one API key.

> [accordion] Reasons to Use Concentrate with Zed
>
> 1. **One API key** — Use one Concentrate key instead of managing separate provider accounts in Zed.
> 2. **More model choice** — Pick Claude, OpenAI, and other models from the Concentrate catalog in the agent panel.
> 3. **Prompt caching** — Zed asks for prompt caching on every model, so most Claude chats are [cached](https://concentrate.ai/docs/api-reference/endpoint/prompt-caching.md) too.
> 4. **Spend controls** — Manage usage with Concentrate keys and budgets.
> 5. **Usage analytics** — Review requests, models, tokens, and costs in your [dashboard](https://concentrate.ai/dashboard).

## Quick Start

The [Concentrate CLI](https://concentrate.ai/docs/integrations/cli.md) (`cn`, beta) sets up Zed in one command. Zed doesn't need to be closed.

> [accordion] View prerequisites (before you begin)
>
> * macOS or Linux, with Node.js 22.13 or newer
> * A Concentrate account with credits. You can sign in with `cn login`, or create an API key at [concentrate.ai/api-keys](https://concentrate.ai/api-keys).
> * [Zed](https://zed.dev) installed

**1. Install the Concentrate CLI and sign in**

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/concentrateai-hq/cli/main/install.sh | bash
cn login
```

Sign-in is rolling out gradually; if it isn't available for you yet, `cn` asks you to paste a key instead. You can also run `cn setup` to paste a key.

**2. Configure Zed**

```bash theme={null}
cn configure zed
```

This adds a "Concentrate" provider to Zed's `settings.json` with every Concentrate model that supports tool calls. Your other settings, providers, and comments are kept. If you haven't picked a default agent model yet, Claude Sonnet under Concentrate becomes the default.

**3. Provide your key (Linux only)**

On macOS, `cn` saves your key in the keychain, where Zed looks for it, so you can skip this step.

On Linux, set `CONCENTRATE_API_KEY` in the environment Zed starts from, or enter your key for the Concentrate provider in Zed's agent settings.

**4. Pick a model**

Open Zed's Agent panel and pick a model under **Concentrate**. Send a short prompt to confirm the connection.

Run `cn refresh` later to pick up new models. `cn key` updates the saved key.

## Manual Setup

To configure Zed yourself, add a Concentrate provider to your Zed `settings.json` (`~/.config/zed/settings.json`):

```json theme={null}
{
  "language_models": {
    "openai_compatible": {
      "Concentrate": {
        "api_url": "https://api.concentrate.ai/v1",
        "available_models": [
          {
            "name": "claude-sonnet-5-5",
            "display_name": "Claude Sonnet 5.5",
            "max_tokens": 1000000,
            "max_output_tokens": 128000,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": true,
              "prompt_cache_key": true
            }
          }
        ]
      }
    }
  }
}
```

Add more models from the [models page](https://concentrate.ai/models) using their ID as `name`. Then provide your key: set `CONCENTRATE_API_KEY` in the environment Zed starts from, or enter it for the Concentrate provider in Zed's agent settings.

## Remove Concentrate AI

If you used `cn configure zed`, run:

```bash theme={null}
cn reset zed
```

This removes the Concentrate provider, the keychain entry `cn` created, and the default model if `cn` set it. A default model you picked yourself is left alone. `cn logout` does the same along with removing your saved key. If you set Zed up by hand, remove the `Concentrate` entry from `settings.json`.

## Troubleshooting

> [accordion] Concentrate models are missing
>
> Run `cn configure zed` again, or `cn refresh` if you configured it before. Zed reloads its settings on its own.

> [accordion] API key is missing or invalid
>
> On macOS, run `cn key` to save the key again. On Linux, confirm `CONCENTRATE_API_KEY` is set for Zed or re-enter the key in Zed's agent settings. A 402 response means the account needs credits.

> [accordion] Something else is wrong
>
> Run `cn --version` and `cn doctor`, then email the output to [support@concentrate.ai](mailto:support@concentrate.ai).

## Next Steps

> [card] [Concentrate CLI](https://concentrate.ai/docs/integrations/cli.md)
>
> Every `cn` command and supported tool.

> [card] [Available Models](https://concentrate.ai/docs/api-reference/endpoint/list-models.md)
>
> Browse the model catalog.


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