Skip to content

OpenCode

OpenCode Desktop App

Install the OpenCode Desktop App

Configure the provider

  1. Go to Settings β†’ Providers and select the option to connect a custom provider.
  2. Enter the following configuration:
    • Base URL: https://api.uuroute.ai/v1
    • API key: Paste your UURoute API key. You can register and create an API key on the UURoute platform.
    • Model: In the UURoute model marketplace, select a model and copy its model ID, such as gpt-4.1 or gemini-2.5-pro.

Select the Model and Start Coding

After completing the configuration, select the model you added and start a coding conversation.

OpenCode CLI

Install OpenCode

  • On macOS or Linux, run the installation script:

    curl -fsSL https://opencode.ai/install | bash
    
  • If you use Node.js, install OpenCode globally with npm:

    npm i -g opencode-ai
    

Configure the provider

Edit the global configuration file at ~/.config/opencode/config.json. Use the following example as a starting point:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "UURoute": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "UURoute",
      "options": {
        "baseURL": "https://api.uuroute.ai/v1",
        "apiKey": "YOUR_UUROUTE_API_KEY"
      },
      "models": {
        "gpt-4.1": {
          "name": "gpt-4.1"
        }
      }
    }
  }
}

Replace YOUR_UUROUTE_API_KEY with the API key you created on UURoute. You can also replace gpt-4.1 with another model ID available on the platform.

Use OpenCode

  1. Open your project directory and run opencode to start the terminal user interface (TUI).
  2. Enter /connect in the conversation box.
  3. Select the provider configured in config.json, such as UURoute.
  4. Enter your UURoute API key if prompted, then select a model to begin.

OpenCode Extension for VS Code

Install OpenCode

Install OpenCode globally with npm:

npm i -g opencode-ai

Install the VS Code Extension

Open the VS Code Marketplace, search for OpenCode, and install the extension.

Configure UURoute

Follow the instructions in Configure the provider in the OpenCode CLI section and add your custom provider configuration to ~/.config/opencode/config.json.

Start Using OpenCode

  1. In VS Code, click the OpenCode button in the upper-right corner.
  2. Enter /connect in the conversation box.
  3. Select your custom provider and model to begin coding.