Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Models & Subscriptions

Kimaki gives you access to every model OpenCode supports: Anthropic, OpenAI, Google, and more. You can authenticate with an API key, or use your existing Claude Pro/Max and ChatGPT/Codex subscriptions via OAuth so you pay nothing extra per token.

The /login command

Run /login in any project channel. Kimaki walks you through a short flow:
/login ┌──────────┐ ┌──────────┐ ┌──────────┐ provider ─── method ─── auth (anth/ (OAuth/ (modal) openai) key) └──────────┘ └──────────┘ └──────────┘
  1. Pick a provider. Connected providers show a checkmark.
  2. Pick a method. Choose OAuth to use a subscription, or API key to paste a key.
  3. Authenticate. For OAuth, open the link and authorize; some providers ask you to paste a short code back. For API keys, enter the key in a modal.

Using subscriptions instead of API credits

The reason to choose OAuth is cost. When you log in with OAuth, Kimaki authenticates the same way the native CLIs do, so your subscription covers inference and per-token costs show as zero.
  • Anthropic — log in with your Claude Pro or Claude Max subscription. Kimaki requests the inference scope and treats requests as Claude Code requests, so subscription usage applies.
  • OpenAI / Codex — log in with your ChatGPT subscription to use Codex models without per-token API billing.
If you already authenticated OpenCode on this machine (for example with the OpenCode CLI), those credentials are reused. You may not need to /login at all.

Pooling every subscription with Subrouter

Subrouter is the first entry in the /login provider list. Pick it and Kimaki asks which subscription to add, then adds it to a shared pool. Log in as many times as you like, to as many providers as you like.
When a run hits a rate limit, Subrouter tries the next account. When every account of that provider is exhausted, it tries the next provider. Quota and authentication failures rotate through the pool; normal request errors return immediately so a bad prompt is not repeated across subscriptions.
model: subrouter/default anthropic/claude-opus-4-6 ──429── second Claude account ──429── openai/gpt-5.5 exhausted ──────┴── xai/grok-4.6
Rate-limited accounts go into a cooldown shared by every session on the machine, so nothing retries a subscription that is known to be out. A 429 honors retry-after or retry-after-ms when the provider sends one, including zero. Without a usable retry delay, the fallback is five minutes. A 402 (balance exhausted) waits six hours.
After logging in, pick the model with /model and choose subrouter/default.

Managing the pool

Everything except login is the subrouter CLI. Kimaki does not wrap it; run it directly.
# everything at a glance: accounts, presets, cooldowns npx -y @subrouter/cli status # accounts and their cooldown state npx -y @subrouter/cli account list npx -y @subrouter/cli account remove anthropic <n|email> # stop waiting on cooldowns and retry everything now npx -y @subrouter/cli cooldown clear
Install it globally with npm i -g @subrouter/cli if you use it often.

Presets

A preset is an ordered list of provider/model entries, and every preset shows up as a model named subrouter/<preset>.
# try Opus first, fall back to Grok npx -y @subrouter/cli preset create fast --models 'anthropic/claude-opus-4-6,xai/grok-4.6' npx -y @subrouter/cli preset list npx -y @subrouter/cli preset remove fast
The builtin default preset ranks the newest model of every provider you are logged in to. Create a preset named default to override it. New presets appear in /model after the OpenCode server restarts.

Legacy per-provider rotation

Before Subrouter, Kimaki rotated accounts within a single provider: pick anthropic/claude-opus-4-6, hit a limit, swap to your second Claude account, keep the same model. That still works and is still the path used by plain anthropic/*, openai/*, and xai/* model ids.
It cannot fall back to a different provider, so prefer Subrouter. To move an existing account across, run /login, pick Subrouter, and authorize it again.
Legacy kimaki multioauth commands
# List all stored Anthropic + OpenAI accounts (active one marked) kimaki multioauth list # Per-provider management kimaki multioauth anthropic list kimaki multioauth anthropic remove <index-or-email> kimaki multioauth openai list kimaki multioauth openai check # test all accounts for usage limits kimaki multioauth openai remove <index-or-email>

Choosing the model after login

Once a provider is connected, pick the model:
  • /model — choose provider, model, and (if supported) a thinking-level variant. Store it per session, per channel, or globally.
  • Agent files — define a model + variant + permissions once and switch with a single /<name>-agent command. This is faster than the /model menus when you switch often.
See Model & Agent Switching for the full agent-file workflow.

API keys instead of subscriptions

Prefer a plain API key? Choose API key in the /login method step and paste it. You can also set the model directly in your project's opencode.json:
{ "model": "anthropic/claude-sonnet-4-20250514" }
Format is provider/model-name, for example openai/gpt-5.3-codex or google/gemini-3-pro-preview.