Docs

Zed

Zed declares an OpenAI-compatible provider in settings.json and takes the key separately, through the Agent Panel. The models array is not a convenience — it is the entire model list Zed will know about.

A language_models.openai_compatible block in settings.json declares the endpoint and its models; the key goes in the Agent Panel UI, never in the file.

~/.config/zed/settings.json
{
  "language_models": {
    "openai_compatible": {
      "kunavo": {
        "api_url": "https://api.kunavo.com/v1",
        "available_models": [
          {
            "name": "claude-sonnet-5",
            "display_name": "Claude Sonnet 5",
            "max_tokens": 200000,
            "max_output_tokens": 64000,
            "capabilities": { "tools": true, "images": true }
          },
          {
            "name": "claude-haiku-4-5",
            "display_name": "Claude Haiku 4.5",
            "max_tokens": 200000
          }
        ]
      }
    }
  }
}
The API key does not go in this file. Zed's documentation says so directly — enter it in the Agent Panel provider settings, or set the environment variable Zed generates for the provider name. settings.json is synced and shared; a key in it travels with it.
available_models is the whole catalog as far as Zed is concerned — there is no discovery call for an OpenAI-compatible provider, so a model you did not list is not in the picker. Add an entry per id you intend to use, with max_tokens set to that model's real context window.

Step by step

  1. Create a key at /app/keys and copy it — it is shown once.
  2. Open settings.json with zed: open settings from the command palette and add the block above.
  3. Open the Agent Panel settings, find the provider under the name you used as the key (kunavo here) and paste the API key there.
  4. Pick the model in the Agent Panel's model selector — it shows the display_name, and sends the name.
  5. Only override the capabilities that differ from Zed's defaults; the defaults are tools: true with images and parallel tool calls off.

Checked against Zed's API-access documentation on September 6, 2026. Third-party settings move; if a field name here no longer matches what you see, that page is the authority, not this one.

Verify before you debug the client

One request settles whether a failure is the endpoint, the key, or the configuration file. If this returns JSON, the same base URL and key work in Zed.

# Settles whether a failure is the endpoint, the key, or the client.
curl -sS https://api.kunavo.com/v1/models \
  -H "Authorization: Bearer sk-kn-..."

Which model id to put in the field

Every text model is reachable as a model id — the live list is GET /v1/models, and the catalog with prices is on the models page. Rates are USD per 1M tokens, input / output.

Model idKunavo in / outWhere it fits in Zed
claude-sonnet-5$2.00 / $10.00the agent's default — tools and images on
claude-opus-5$2.00 / $10.00larger refactors, where the plan matters more than the rate
claude-haiku-4-5$0.40 / $2.00inline assists and quick edits
gpt-5-4$1.00 / $6.00a second family behind the same provider entry
Billing is per token from a prepaid balance with no monthly fee — see billing. On repeated context — which is most of what an editor or a chat client sends — prompt caching moves the bill more than the model choice does.

FAQ

How do I add an OpenAI-compatible provider to Zed?

Add a language_models.openai_compatible block to settings.json with your provider name as the key, an api_url pointing at the endpoint's /v1 root, and an available_models array listing each model id you want. Then open the Agent Panel provider settings and enter the API key there. Zed's documentation is explicit that keys do not belong in settings.json.

Why does a model not appear in Zed's model picker?

Because it is not in available_models. Zed does not query an OpenAI-compatible endpoint for its catalog, so the array in settings.json is the complete list of models that provider offers. Add an entry with the model's id as name, a display_name for the picker, and max_tokens set to its real context window.

Where does Zed store the API key for a custom provider?

In the Agent Panel's provider settings UI, or in the environment variable Zed generates from the provider name — not in settings.json. Zed keeps credentials outside the settings file on purpose, because that file is meant to be portable and shareable while a key is neither.

Can Zed use Claude models through a custom endpoint?

Yes. The openai_compatible provider sends the model name straight through to api_url, so a Claude id is resolved by the endpoint rather than by Zed. Set capabilities.tools to true for models that support tool calling — it is Zed's default for this provider type — and the agent works the same as with a first-party provider.