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

# Zed

> Connect Zed to Novita's OpenAI-compatible LLM API endpoint.

Zed is a high-performance, multiplayer code editor with built-in AI features. You can connect Zed to Novita's OpenAI-compatible LLM API endpoint as a custom OpenAI-compatible provider, and use Novita models in the Agent Panel, Inline Assistant, and other Zed AI features.

## Prerequisites

Before you begin, prepare the following values:

* **API key**: Create or copy an API key from [Key Management](https://novita.ai/settings/key-management).
* **Base URL**: `https://api.novita.ai/openai/v1`
* **Model ID**: Copy the model ID you want to use from the Model Hub, such as `deepseek/deepseek-v4.1-flash`.

<Tip>
  Keep your API key private. Enter it only in Zed's settings UI (it is stored in the system keychain) and never commit it to a Git repository.
</Tip>

## Add Novita as an OpenAI-compatible provider

Open Zed's command palette and run:

```text theme={"system"}
agent: open settings
```

Under **AI** settings, click **Configure** next to **LLM Providers**:

<Frame>
  <img src="https://mintcdn.com/novitaai/laSyDALdQwe0SueG/guides/images/zed/open-llm-providers.png?fit=max&auto=format&n=laSyDALdQwe0SueG&q=85&s=8f09b59e3fc66d123742bcf661f9b0cf" width="1790" height="1192" data-path="guides/images/zed/open-llm-providers.png" />
</Frame>

Click **Add Provider**, choose **OpenAI** under **Compatible APIs**, and fill in the provider name, API URL, model ID, and context window:

<Frame>
  <img src="https://mintcdn.com/novitaai/laSyDALdQwe0SueG/guides/images/zed/add-provider-openai-compatible.png?fit=max&auto=format&n=laSyDALdQwe0SueG&q=85&s=b049e16532728193593fb7ad6ee0d05b" width="1782" height="1310" data-path="guides/images/zed/add-provider-openai-compatible.png" />
</Frame>

Alternatively, configure the provider directly in your `settings.json`:

```json theme={"system"}
{
  "language_models": {
    "openai_compatible": {
      "novita": {
        "api_url": "https://api.novita.ai/openai/v1",
        "available_models": [
          {
            "name": "deepseek/deepseek-v4.1-flash",
            "display_name": "Novita: DeepSeek V4.1 Flash",
            "max_tokens": 1048576
          }
        ]
      }
    }
  }
}
```

<Tip>
  Set `max_tokens` to the model's context window. Check the current value for your model in the [Model Hub](https://novita.ai/models), since it varies per model.
</Tip>

Enter your Novita API key in the provider settings UI, or set it as an environment variable. For a provider named `novita`, Zed reads `NOVITA_API_KEY` from its process environment (generated from the provider ID as upper snake case plus `_API_KEY`). Do not put the API key in `settings.json`.

## Start using Novita models in Zed

Open the Agent Panel and select your Novita model from the model picker. Send a test prompt:

```text theme={"system"}
In one sentence, tell me what programming tasks you can help with.
```

<Frame>
  <img src="https://mintcdn.com/novitaai/laSyDALdQwe0SueG/guides/images/zed/chat-test.png?fit=max&auto=format&n=laSyDALdQwe0SueG&q=85&s=f922ac756047ec14cea71884d4700596" width="1148" height="362" data-path="guides/images/zed/chat-test.png" />
</Frame>

If the request fails, check that:

* Your API key is correct and entered in the provider settings UI (or the generated environment variable is set).
* The API URL is `https://api.novita.ai/openai/v1`.
* The model ID exactly matches the Model ID in Novita's Model Hub.


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