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

# Set Up ASI:One in Zed

> Add asi1-ultra and the other ASI:One models to the Zed agent panel as an OpenAI-compatible provider.

## Overview

ASI:One is [OpenAI-compatible](/documentation/build-with-asi-one/openai-compatibility),
so [Zed](https://zed.dev) can use it through its OpenAI-compatible provider
settings. You declare the provider and its models in `settings.json`, pick a
model in the agent panel, and Zed stores your key in the system keychain.

## Prerequisites

* Zed installed.
* An ASI:One API key. Create one at [asi1.ai/developer](https://asi1.ai/developer).
  Keys start with `sk_`.
* An ASI:One plan that includes `asi1-ultra`. The same key also works for `asi1`
  and `asi1-mini`.

## Add the provider

Open your Zed settings with `zed: open settings` in the command palette. Zed
keeps them at `~/.config/zed/settings.json` on macOS and Linux, and
`%APPDATA%\Zed\settings.json` on Windows. On macOS, that is `~/.config/zed`,
not `~/Library/Application Support` like most Mac apps. Add the provider under
`language_models`:

```json
{
  "language_models": {
    "openai_compatible": {
      "asi:one": {
        "api_url": "https://api.asi1.ai/v1",
        "available_models": [
          {
            "name": "asi1-ultra",
            "max_tokens": 800000,
            "max_output_tokens": 128000,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": true,
              "chat_completions": true,
              "interleaved_reasoning": false,
              "max_tokens_parameter": true,
              "prompt_cache_key": false
            }
          },
          {
            "name": "asi1",
            "max_tokens": 300000,
            "max_output_tokens": 16384,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": true,
              "chat_completions": true,
              "interleaved_reasoning": false,
              "max_tokens_parameter": true,
              "prompt_cache_key": false
            }
          }
        ]
      }
    }
  }
}
```

What the fields do:

* `max_tokens` is the context window Zed assumes for the model, which it uses
  to decide when a thread is full and needs compacting. The values are each
  model's working window (see [Context windows](/documentation/models#context-windows)).
* `max_output_tokens` is the room reserved for the reply. Zed sends it as
  `max_tokens` on each request.
* `prompt_cache_key` stays `false`. ASI:One answers `400` to request parameters
  it doesn't support, and `false` is what keeps Zed from sending this one.
* To put `asi1-mini` in the picker too, add an entry for it in the same shape.

## Sign in

Zed asks for the API key the first time you use the provider. Open the agent
panel, pick an ASI:One model in the model picker, and paste your `sk_` key into
the prompt. Zed stores it in your system keychain, keyed by the API URL, and
reuses it from then on.

## Choose the model

To make `asi1-ultra` the default for new threads and keep long-running threads
well inside the window, add:

```json
{
  "agent": {
    "default_model": {
      "provider": "asi:one",
      "model": "asi1-ultra",
      "enable_thinking": false
    },
    "auto_compact": {
      "enabled": true,
      "threshold": "30%"
    }
  }
}
```

Use `asi1-ultra` for deep refactors, debugging and reviews, and switch to
`asi1` for routine edits where speed matters more. See [ASI:One Models](/documentation/models) for the tradeoffs. When thinking is enabled, the
model streams its [reasoning](/documentation/build-with-asi-one/reasoning)
alongside the answer and Zed renders it as a collapsible thinking block.

`auto_compact` sets how early Zed summarizes a thread that is filling up.
A `30%` threshold on `asi1-ultra` fires compaction with generous headroom left,
so long-running threads compact before the window fills instead of failing
near the limit. Raise it if threads compact more often than you would like.

## Things to know

* **Concurrency.** Zed allows 4 concurrent in-flight requests per provider and
  model; requests past that queue silently, which looks like a spinner with no
  thinking output. If you run many agent threads in parallel, copy the whole
  `asi:one` block under a second id such as `asi:one-2` and point the extra
  threads at it. Because the keychain entry is keyed by API URL, the clone
  picks up your stored key with no re-entry.

## Troubleshooting

| Symptom                                              | Cause and fix                                                                                                                                                                                                                                                       |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `401`                                                | The key is wrong or has been revoked. Create a new one at [asi1.ai/developer](https://asi1.ai/developer) and re-enter it when Zed prompts.                                                                                                                          |
| `404` model not found                                | The model name in the config or picker is misspelled. Use `asi1`, `asi1-ultra` or `asi1-mini`.                                                                                                                                                                      |
| `400` on an unknown parameter                        | Zed sent a parameter ASI:One doesn't support. Make sure `prompt_cache_key` is `false` in that model's `capabilities`.                                                                                                                                               |
| A thread spins with no thinking output               | More than 4 requests are already in flight for that provider and model, and this one is queued. Wait for a slot, or move threads onto a cloned provider entry (see Things to know).                                                                                 |
| A long thread fails to compact or exceeds the window | The model's `max_tokens` is set higher than its [working window](/documentation/models#context-windows), so Zed judges the thread to have room it does not have. Use the values above, and keep the `auto_compact` threshold early enough to fire before the limit. |
| Rate limit errors                                    | See [Errors and Rate Limits](/documentation/build-with-asi-one/errors).                                                                                                                                                                                             |

## Next steps

1. **[Cursor](/documentation/coding/cursor)**: the same models in the Cursor editor
2. **[OpenCode](/documentation/coding/opencode)**: the same models in OpenCode
3. **[ASI:One Models](/documentation/models)**: choosing between `asi1`, `asi1-ultra` and `asi1-mini`
4. **[OpenAI Compatibility](/documentation/build-with-asi-one/openai-compatibility)**: which parameters each endpoint supports