Prerequisites
Before you begin, prepare the following values:- API key: Create or copy an API key from 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.
Install OpenCode
OpenCode provides command-line and desktop options. Choose one installation method.Linux / macOS / WSL2
Use one of the following methods:Desktop
You can also download the desktop app from: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:Verify the model
After saving the provider, select your Novita model in OpenCode and send a test prompt:- 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.