Use Tokun with Cline
Use Tokun as the model backend for Cline (the VS Code agent) via its OpenAI-Compatible provider — the same Cline workflow, billed at Tokun pricing with Tokun's model routing.
What this connects
Use Tokun as the model backend for Cline (the VS Code agent) via its OpenAI-Compatible provider — the same Cline workflow, billed at Tokun pricing with Tokun's model routing.
Before you start
- A Tokun API key (starts with
sk-) from the console. - A funded Tokun balance.
Clineinstalled in VS Code.- A chosen model id, e.g.
anthropic/claude-opus-4-8.
Recommended quickstart
In Cline, open the API-provider settings and choose OpenAI Compatible, then set:
- Base URL:
https://api.tokun.sh/v1. - API Key: your Tokun
sk-… key. - Model ID: a Tokun id, e.g.
anthropic/claude-opus-4-8.
Save, then start a task.
Copy for AI agent
Working inside an AI coding agent? The shortest path is one line — paste this and your agent reads the full machine-readable guide at /llms.txt and does the Cline setup itself. You only supply your key:
Read https://tokun.sh/llms.txt and integrate Tokun into this project.Cline specifically.You are helping the user configure Cline to use Tokun. Cline's provider config lives in its VS Code settings UI, so OUTPUT these steps for the user rather than editing anything:
1. Open Cline's settings -> API Provider -> "OpenAI Compatible".
2. Base URL: https://api.tokun.sh/v1
3. API Key: the Tokun key (starts with sk-).
4. Model ID: a Tokun lab/model id, e.g. anthropic/claude-opus-4-8.
5. Save, then start a task.
The key is a Tokun sk- key (NOT an OpenAI/Anthropic key). The base URL keeps the /v1 suffix.Manual configuration
All three fields (base URL https://api.tokun.sh/v1, key, model id) live in Cline's OpenAI-Compatible provider settings. To roll back, switch the provider back or clear the base URL.
Model naming
Use any Tokun lab/model id as the Model ID, e.g. anthropic/claude-opus-4-8 or openai/gpt-5.5. Tokun does not silently substitute models — an unknown id returns an error.
Verify & troubleshoot
OpenAI Compatible provider (not the Anthropic one) and keep the /v1 suffix on the base URL (https://api.tokun.sh/v1). The key is your Tokun sk- key.| Symptom | Likely cause | Fix |
|---|---|---|
401 / auth error | Wrong or missing key | Use your Tokun sk- key. |
402 / payment required | Empty Tokun balance | Top up in the console. |
Model not found | Wrong or blank Model ID | Set a lab/model id, e.g. anthropic/claude-opus-4-8. |