# OpenCode - Documentation

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

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/guides/opencode

# 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)

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)

Install OpenCode

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

###

[​](#linux-/-macos-/-wsl2)

Linux / macOS / WSL2

Use one of the following methods:

```
curl -fsSL https://opencode.ai/install | bash
```

```
brew install anomalyco/tap/opencode
```

```
npm i -g opencode-ai
```

###

[​](#desktop)

Desktop

You can also download the desktop app from:

```
https://opencode.ai/download
```

##

[​](#configure-a-custom-provider)

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:

FieldValueDisplay name`Novita`Base URL`https://api.novita.ai/openai/v1`API keyYour Novita API keyModel IDFor example, `deepseek/deepseek-v3.1`

Make sure the Model ID exactly matches the value in Novita’s Model Hub. Context length, pricing, and capabilities depend on the selected model.

##

[​](#verify-the-model)

Verify the model

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

```
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.

Last modified on June 25, 2026
