Integration · coding agent

OpenCode on llmbox

OpenCode is an open-source coding agent for the terminal, desktop and browser. Add llmbox as a provider to use DeepSeek, GPT, Gemini and Qwen with one API key. Pay per token.

  • Terminal, desktop and web
  • Provider in opencode.jsonc
  • One API key
~/.config/opencode/opencode.jsonc
OpenAI-compatible
Provider ID
llmbox
baseURL
https://llmbox.cc/v1
env
LLMBOX_API_KEY
models
/models in OpenCode
  • deepseek/deepseek-v4-pro
  • openai/gpt-6.1-sol
  • google/gemini-3.1-pro
  • qwen/qwen3.8-max
  • + 28 more

Setup

Set up OpenCode

  1. Install OpenCode

    Install the terminal version with one command. Desktop builds for macOS, Windows and Linux are on opencode.ai.

  2. Add the provider

    Define llmbox in opencode.jsonc (example below) and store your API key from the dashboard in an environment variable:

  3. Pick a model

    Run opencode and open the list with /models: llmbox models appear as llmbox/<ID>.

    Full guide

Models

DeepSeek, GPT, Gemini and Qwen

Choose a model for each task and switch within a session using the same llmbox API key.

Full catalog
ModelModel in OpenCodeInput, 1MOutput, 1M
DeepSeek V4 Prollmbox/deepseek/deepseek-v4-pro$0.19$0.555
DeepSeek V4.1 Flashllmbox/deepseek/deepseek-v4.1-flash$0.10$0.27
GPT-6.1 Solllmbox/openai/gpt-6.1-sol$1.80$5.00
GPT-5.6 Solllmbox/openai/gpt-5.6-sol$0.80$2.00
Gemini 3.1 Prollmbox/google/gemini-3.1-pro$0.60$2.45
Qwen3.8 Maxllmbox/qwen/qwen3.8-max$0.225$0.7875

Prices are per million tokens, from the catalog.

Config file

Provider in opencode.jsonc

A file in ~/.config/opencode applies to every project; one in the project root applies to that project only. OpenCode reads the API key from an environment variable. OpenCode 1 uses its own schema — see the second tab.

Example in the docs
~/.config/opencode/opencode.jsonc
{
"$schema": "https://opencode.ai/config.json",
"providers": {
"llmbox": {
"name": "llmbox",
"env": ["LLMBOX_API_KEY"],
"package": "@opencode/ai/providers/openai-compatible",
"settings": { "baseURL": "" },
"models": {
"deepseek/deepseek-v4-pro": { "name": "DeepSeek V4 Pro" },
"openai/gpt-6.1-sol": { "name": "GPT-6.1 Sol" }
}
}
},
"model": "llmbox/deepseek/deepseek-v4-pro"
}

How it works

Works like a built-in provider

Coding tools

OpenCode reads and edits files, runs terminal commands and plans the work.

Usage in your dashboard

Track each request's model, tokens and cost in your dashboard. Set a spending limit for each API key.

Long sessions use more tokens

Agent requests include session history, so longer tasks use more input tokens. Compare model prices in the catalog.

Scenarios with OpenCode

Questions

FAQ

How do I use DeepSeek in OpenCode?

Add llmbox as a provider in opencode.jsonc and list deepseek/deepseek-v4-pro or deepseek/deepseek-v4.1-flash under models. The same API key works for GPT, Gemini and Qwen.

Which API key does OpenCode use?

Your llmbox API key from the dashboard. OpenCode reads it from the environment variable named in the provider's env field.

How is OpenCode 1 configured?

In OpenCode 1 the provider goes under provider: the @ai-sdk/openai-compatible package, with the address and key in options. See the second config tab.

How are OpenCode requests billed?

Agent requests are billed per token at catalog rates and deducted from your llmbox balance. Pay as you go, with no subscription.

Connect OpenCode to llmbox

Create an API key in your llmbox dashboard after signing up.

OpenCode is an open-source project under the MIT license.