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

# OpenCode

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

OpenCode is an AI coding tool that supports custom providers. You can configure OpenCode with Novita's OpenAI-compatible LLM API endpoint and use Novita models for coding, debugging, refactoring, and project Q\&A.

## 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-v3.1`.

## Install OpenCode

OpenCode provides command-line and desktop options. Choose one installation method.

### Linux / macOS / WSL2

Use one of the following methods:

```bash theme={"system"}
curl -fsSL https://opencode.ai/install | bash
```

```bash theme={"system"}
brew install anomalyco/tap/opencode
```

```bash theme={"system"}
npm i -g opencode-ai
```

### Desktop

You can also download the desktop app from:

```text theme={"system"}
https://opencode.ai/download
```

## Configure a custom provider

Open the OpenCode settings page and find the provider settings. Depending on your OpenCode version, this is usually under **Settings** → **Providers** → **Custom Provider**.

Fill in the following values:

| Field        | Value                                 |
| :----------- | :------------------------------------ |
| Display name | `Novita`                              |
| Base URL     | `https://api.novita.ai/openai/v1`     |
| API key      | Your Novita API key                   |
| Model ID     | For example, `deepseek/deepseek-v3.1` |

<Tip>
  Make sure the Model ID exactly matches the value in Novita's Model Hub. Context length, pricing, and capabilities depend on the selected model.
</Tip>

## Verify the model

After saving the provider, select your Novita model in OpenCode and send a test prompt:

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

If the model responds, the integration is working. If verification fails, check that:

* Your API key is correct and your account has available balance.
* The Base URL is `https://api.novita.ai/openai/v1`.
* The Model ID is correct.
* Your network can reach the Novita API endpoint.
