Use Tokun with Continue

Connect Continue to Tokun using your API key and a supported model.

Overview

Continue, the VS Code and JetBrains assistant, uses Tokun as a model through its OpenAI-compatible provider. Your Continue workflow stays the same, and requests use Tokun's pricing and model routing.

Before you start

  • A Tokun API key (starts with sk-) from the API keys page.
  • A funded Tokun balance.
  • Continue, installed in your editor.
  • A model ID, such as anthropic/claude-opus-4-8.

Quickstart

In your Continue config (~/.continue/config.yaml), add a Tokun model under models:

yaml
models:
  - name: Tokun Opus
    provider: openai
    model: anthropic/claude-opus-4-8
    apiBase: https://api.tokun.sh/v1
    apiKey: sk-...

Reload Continue and select the Tokun model.

Set up with an AI assistant

Paste this prompt into your AI coding agent. It reads the setup guide at /llms.txt and sets up Continue for you. You only need to provide your API key.

text
Read https://tokun.sh/llms.txt and integrate Tokun into this project.
Prefer exact, step-by-step instructions? Paste this detailed prompt instead. It sets up Continue specifically.
text
You are helping the user configure Continue to use Tokun. Edit ~/.continue/config.yaml and add a model:

models:
  - name: Tokun Opus
    provider: openai
    model: anthropic/claude-opus-4-8
    apiBase: https://api.tokun.sh/v1
    apiKey: <the Tokun sk- key>

Notes:
- provider MUST be "openai" (the OpenAI-compatible path); apiBase keeps the /v1 suffix.
- The key is a Tokun sk- key, NOT an OpenAI/Anthropic key.
- Reload Continue after saving.

Set up manually

The Tokun model is defined in ~/.continue/config.yaml with provider: openai, apiBase: https://api.tokun.sh/v1, and your key. To roll back, remove the model entry.

Model IDs

Set model to any Tokun model ID in lab/model format, such as anthropic/claude-opus-4-8 or openai/gpt-5.5. Tokun never substitutes a different model: an unknown ID returns an error.

Official model pools

Official model pools appear in the model catalog and use a pool ID such as flash-pool. Choose an available pool from the live catalog; pool names and members are configured by Tokun administrators.

When the pool enables member selection, use pool-id/member-name, replacing the model's lab prefix with the pool ID. The selected member is the only model that can execute; the pool's pricing mode still applies. When selection is disabled, this form returns 400.

  • Fixed token pricing uses the pool's input, output, cache and context-tier rates for every member, including a member you select yourself.
  • Actual model pricing uses the serving member's price, frozen before the request. A retry to another member uses that member's frozen price.
  • Fixed per-request pricing charges once after an upstream success response begins. Missing usage, a partial response or a client disconnect after that point still counts once. Failures before success and unsuccessful retries do not add charges.

Use a pool that lists the API format this client sends. Model pool settings in the live catalog control which members are shown and whether member selection is available.

Troubleshooting

Use provider: openai (the OpenAI-compatible path) and keep the /v1 suffix on apiBase (https://api.tokun.sh/v1). The key is your Tokun sk- key.
SymptomLikely causeFix
401 / auth errorWrong or missing keyUse your Tokun sk- key as apiKey.
402 / payment requiredEmpty Tokun balanceTop up on the Billing page.
Model not foundWrong model IDSet model to a lab/model ID, such as anthropic/claude-opus-4-8.