Back to docs

OpenCode

OpenCode Custom Provider API Guide

Configure OpenCode Desktop to call models through the OurToken API proxy and use your OurToken account balance in about 3 minutes.

3 minBeginnerLast updated: 2026-06-11

Prerequisites: three values you need

With a short OpenCode configuration, your local OpenCode Desktop can call models through the OurToken API proxy and use your OurToken account balance.

The full setup takes about 3 minutes.

OurToken provides multiple large language model APIs, including:

  • GPT models at about 20% of the official price
  • Claude models at about 40% of the official price
  • Discounted API pricing for DeepSeek, MiniMax, GLM, and other models

Visit the OurToken website to check supported models and the latest prices.

ItemExampleHow to get it
Base URLhttps://api.ourtoken.ai/v1Copy directly
API KeyYour OurToken API KeyCreate it on the API Keys page
Modelgpt-5.5Check available model names on OurToken

Important

The Base URL should be exactly:

text
https://api.ourtoken.ai/v1

Do not append /responses or any other API path. OpenCode adds the request path automatically.


Step 1: Install the latest OpenCode Desktop

Open the official OpenCode download page:

Download OpenCode Desktop

Download and install the version for your operating system.

OpenCode download pageOpenCode download page


Step 2: Configure Custom Provider

Open OpenCode Desktop and go to the Provider settings page.

Choose Custom Provider, then fill in:

FieldValue
Provider NameOurToken
Base URLhttps://api.ourtoken.ai/v1
API KeyYour OurToken API Key
Modelgpt-5.5

Save the configuration.

If you cannot find the Custom Provider entry, confirm that you have installed the latest OpenCode Desktop version.

Custom Provider entryCustom Provider entry

OurToken API configurationOurToken API configuration


Step 3: Select Provider and model

Return to the OpenCode chat interface and select the Provider you just added:

text
OurToken

Then select the model you want to use, for example:

text
gpt-5.5

Select Provider and modelSelect Provider and model


Step 4: Test the API connection

In the OpenCode chat interface, send a simple test message:

text
Hello

OpenCode model replyOpenCode model reply

If the model replies normally, OpenCode is connected to the OurToken API.

You can also open the OurToken Dashboard to check API request history and token usage.

  • ✅ OpenCode replies normally: the API connection is ready
  • ❌ OpenCode does not reply: check the Base URL, API Key, and model name

Setup complete

You can now use GPT, Claude, DeepSeek, MiniMax, GLM, and other supported models in OpenCode through OurToken.