Use Kimi K3 in OpenCode: setup and pricing

Add BigModel.io as a provider in opencode.json to run Kimi K3 (kimi-k3) in OpenCode. $2.70 input / $13.50 output per 1M tokens, with a config you can paste.

Model ID
kimi-k3
Input / 1M
$2.70
Output / 1M
$13.50
Context
—

Set up OpenCode with Kimi K3

  1. Create an API key in the BigModel.io console and give it a spend limit; agents send long contexts.
  2. Put the block below in ~/.config/opencode/opencode.json and export BIGMODEL_API_KEY in your shell.
  3. Run opencode; /models lists kimi-k3 under BigModel.io.

~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "bigmodel": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "BigModel.io",
      "options": {
        "baseURL": "https://bigmodel.io/v1",
        "apiKey": "{env:BIGMODEL_API_KEY}"
      },
      "models": {
        "kimi-k3": {
          "name": "Kimi K3"
        }
      }
    }
  },
  "model": "bigmodel/kimi-k3"
}

Add a limit block with the context window from the developer's documentation so OpenCode compacts history in time.

Check the key and model first

This request should return a short reply. If it fails, the tool will fail the same way.

curl https://bigmodel.io/v1/chat/completions \
  -H "Authorization: Bearer $BIGMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"kimi-k3","messages":[{"role":"user","content":"ping"}]}'

401 means the key is wrong, 404 the model ID; fix 401 · fix 404

What it costs

Kimi K3 costs $2.70 per 1M input tokens and $13.50 per 1M output tokens, $0.30 per 1M cached input tokens. A typical agent turn with 20K tokens in and 2K out costs about $0.081; 100 turns about $8.10. Kimi K3 pricing →

Other setups