Cline is an open-source autonomous coding agent for VS Code, and it does not ship a model — you bring your own API key. This guide is the exact settings for running Claude in Cline through one sk-kn- key at about 60% under Anthropic's list price on the mainline models: both provider routes, how to exploit Plan/Act mode to cut the bill, what a real session costs, and an honest account of what you give up versus calling Anthropic directly.
Why Cline needs an API key
Every action Cline takes — reading a file, proposing a diff, running a terminal command, reading the output and trying again — is a model call billed per token. A claude.ai Pro or Max subscription does not cover this: chat plans and API access are separate products, and Cline talks to the API. So the question is not whether to pay per token but at what rate, and because an agentic loop resends the growing task context on every step, the per-token rate is the single biggest lever on what a session costs. That is the whole case for a gateway here: pay-as-you-go from a $10 top-up, one key that also reaches Gemini and GPT, and a balance that never expires.
Setup — the three fields
Open the Cline panel, click the settings gear, and set the API provider to OpenAI Compatible. Three values:
API Provider OpenAI Compatible
Base URL https://api.kunavo.com/v1
API Key sk-kn-... # create at kunavo.com/app/keys
Model ID claude-sonnet-4-6 # or claude-sonnet-5 / claude-opus-5Create the key at the dashboard after signing up and topping up — it is shown once, so store it immediately. Key management, rotation and spend limits are covered in the Claude API key doc. If Cline asks for model metadata such as the context window or output cap, take the numbers from the model page rather than guessing — an understated context window makes Cline truncate earlier than it needs to.
Before letting it edit anything, ask it something small (“explain this file”) to confirm the wiring. A 401 at this point is almost always the key; a 404 is almost always the base URL or a model slug that does not exist — Kunavo matches slugs exactly and does not alias date-suffixed names, so claude-sonnet-4-5-20250929 is a 404 while claude-sonnet-4-6 resolves.
Plan mode and Act mode — the cheapest split
Cline's defining feature is that it separates Plan (read the codebase, ask questions, propose an approach) from Act (make the edits, run the commands), and it lets you configure a different model for each. That maps almost perfectly onto cost, because the two modes have very different token profiles:
- Plan is short and reasoning-heavy. A handful of turns where model quality decides whether the next twenty steps are productive or wasted. Put
claude-opus-5orclaude-sonnet-5here — it is a small share of the tokens, so the stronger model costs little in absolute terms. - Act is long and mechanical. Many steps, each resending context. This is where the per-token rate compounds, so
claude-sonnet-4-6is the value default.
The worked numbers are in the cost section below: planning three steps on Opus 5 and executing seventeen on Sonnet 4.6 costs about $0.86 against $0.74 for the all-Sonnet run — roughly 16% more for materially better planning, and far less than running the whole task on Opus.
The native Anthropic route (and why you might want it)
Cline also ships a native Anthropic provider with a custom base-URL field. Pointing that at Kunavo uses the native Messages API (/v1/messages) instead of the OpenAI-compatible endpoint:
API Provider Anthropic
Base URL https://api.kunavo.com # origin only — the client appends /v1/messages
API Key sk-kn-...
Model ID claude-sonnet-4-6Note the base URL differs between the two routes. The OpenAI-compatible provider wants https://api.kunavo.com/v1; the Anthropic provider wants the bare origin https://api.kunavo.com, because that client appends /v1/messages itself. Pasting the /v1 form into the Anthropic provider produces a 404 that looks like a missing model.
What the native route buys you is prompt caching: cache_control passes through untranslated, and cached input bills at 10% of the input rate (see the prompt-caching doc). On a loop that resends a stable prefix every step, that is the largest saving available — larger than any model swap. Either route works; the OpenAI-compatible one is simpler to start with, and switching later is a settings change.
Which Claude model to set
| Use | Model | Kunavo input / output (per 1M) |
|---|---|---|
| Act mode, everyday coding (default) | claude-sonnet-4-6 | $1.20 / $6.00 |
| Plan mode, near-Opus quality at Sonnet cost | claude-sonnet-5 | $2.00 / $10.00 |
| Plan mode on hard refactors; deep debugging | claude-opus-5 | $2.00 / $10.00 |
| Commit messages, quick Q&A | claude-haiku-4-5 | $0.40 / $2.00 |
| Cheapest capable option | gemini-2-5-flash | $0.09 / $0.75 |
Switching is a one-word change to the model field — same key, same provider config, same endpoint. Full per-model rates against Anthropic's official list are in the Anthropic Claude API price list, and the live catalog is on the pricing page.
Cline on Kunavo vs calling Anthropic directly
The honest comparison, including where going direct is the better call:
| Cline → Kunavo | Cline → Anthropic direct | |
|---|---|---|
| Sonnet 4.6 per 1M (in / out) | $1.20 / $6.00 | $3.00 / $15.00 |
| Getting started | Sign up, top up $10, create a key | Anthropic Console account with billing configured |
| Models on the one key | Claude, Gemini, GPT, plus image, video and audio | Claude only |
| Prompt caching | Yes, via the native Anthropic provider route (cache_control passes through) | Yes, natively |
| Failed requests | Not billed | Not billed |
| Capacity and SLA | Shared upstream capacity, no contractual SLA or guaranteed quota | Your own organization's rate-limit tier and Anthropic's support terms |
| Same-day access to brand-new models | When the upstream channel carries them | On release |
Read that capacity row as written. If your team needs a guaranteed quota, a contractual SLA, or a procurement relationship with the model vendor, go direct — that is what you are paying the difference for. For an individual developer or a small team running Cline, the trade is usually the other way around.
What a Cline session actually costs
Agentic tools are token-hungry by design: each step resends the system prompt, the task history and fresh file context. Realistic numbers at Kunavo rates:
| Unit | Tokens (input / output) | claude-sonnet-4-6 | At Anthropic list |
|---|---|---|---|
| One Act-mode step | 25,000 / 1,200 | $0.037 | $0.093 |
| A 20-step task | ~500k / ~24k | ~$0.74 | ~$1.86 |
| Same task, planned on Opus 5 | ~500k / ~24k | ~$0.86 | ~$2.15 |
| A heavy day (5 such tasks) | — | ~$3.72 | ~$9.30 |
The math, runnable:
# Kunavo Claude rates (USD per 1M tokens): (input, output)
RATES = {
"claude-haiku-4-5": (0.40, 2.00),
"claude-sonnet-4-6": (1.20, 6.00),
"claude-opus-5": (2.00, 10.00),
}
def step_cost(model, in_tokens, out_tokens):
i, o = RATES[model]
return in_tokens / 1_000_000 * i + out_tokens / 1_000_000 * o
# One Act-mode step: Cline resends the task context plus the files it read.
print(step_cost("claude-sonnet-4-6", 25_000, 1_200)) # -> $0.0372
# A realistic 20-step task (edit, run, read the error, fix, repeat):
print(20 * step_cost("claude-sonnet-4-6", 25_000, 1_200)) # -> ~$0.74
# The same task planned on Opus 5, executed on Sonnet 4.6:
print(3 * step_cost("claude-opus-5", 25_000, 1_200)
+ 17 * step_cost("claude-sonnet-4-6", 25_000, 1_200)) # -> ~$0.86Keeping the bill down
- Start new tasks instead of extending one forever. Cline resends the whole conversation each step, so a long-running task grows quadratically in cost. A fresh task is a fresh, small context — this is the highest-leverage habit on the list.
- Split Plan and Act across models. Covered above: it is a settings field, not a discipline problem.
- Use the native Anthropic route for caching. Cached input at 10% of the input rate is the biggest structural saving on a loop that resends a stable prefix.
- Give the editor its own spend-limited key. Create a separate key in the dashboard, set a monthly spend limit on it, and watch usage — a week of real agentic coding is the only honest estimate of what this costs you. The limit is checked before each request and resets with the calendar month, and the key is revocable on its own, so stopping the editor is one action rather than rotating everything.
- Still choosing between the two tools? Cline vs Claude Code compares the billing shapes rather than the feature lists — and both run against this same endpoint, so the choice stays reversible.
FAQ
What base URL do I use for Cline with the Claude API?
In Cline's settings, set API Provider to 'OpenAI Compatible', Base URL to https://api.kunavo.com/v1, paste a Kunavo key (sk-kn-...) and set the model ID to a Claude slug such as claude-sonnet-4-6. If you instead pick Cline's native 'Anthropic' provider, use the origin only — https://api.kunavo.com — because that client appends /v1/messages itself. Adding /v1 to the Anthropic-provider base URL is the most common cause of a 404 here.
Can I use a Claude Pro or Max subscription with Cline?
No. A claude.ai chat subscription does not include API access, and Cline calls the API directly on every step — reading a file, proposing a diff, running a command are all billed model calls. You need a pay-as-you-go API key. On Kunavo that means topping up from $10, with Claude served roughly 30–60% under Anthropic's list price depending on the model, and a balance that never expires.
Which Claude model is best for Cline?
claude-sonnet-4-6 ($1.20/$6.00 per 1M on Kunavo) is the value default for Act mode. Use claude-opus-5 ($2.00/$10.00) or claude-sonnet-5 ($2.00/$10.00) in Plan mode, where the token volume is small and better reasoning pays for itself, and route trivial asks to claude-haiku-4-5 ($0.40/$2.00). Because Cline lets you set a different model for Plan and Act, that split is a settings change rather than a discipline problem.
How much does running Claude in Cline cost?
Cline resends the task context on every step, so cost tracks step count, not wall-clock time. A typical step is around 25,000 input and 1,200 output tokens — about $0.037 on claude-sonnet-4-6 at Kunavo rates, so a 20-step task lands near $0.74 against roughly $1.86 at Anthropic's list price. Failed requests are never billed. The biggest single saving is prompt caching, which bills cached input at 10% of the input rate and is available on the native Anthropic provider route.
What base URL do I use for Cline?
https://api.kunavo.com/v1 with the OpenAI Compatible provider. With Cline's native Anthropic provider, use the origin only — https://api.kunavo.com — because that client appends /v1/messages itself. Adding /v1 there is the most common cause of a 404 on this setup.
Which Claude model should I set in Cline?
claude-sonnet-4-6 for Act mode; claude-opus-5 or claude-sonnet-5 for Plan mode, where better reasoning is cheap because the token volume is small; claude-haiku-4-5 for trivial asks. Comparative positioning across vendors is in Claude vs GPT vs Gemini.
Does the same setup work for Roo Code and Kilo Code?
Yes — both are forks in the Cline family and share the provider model, so the same three fields apply. The details that differ are worth knowing: Roo Code with the Claude API covers its mode system and per-profile model routing, and Kilo Code with the Claude API covers its own setup. For the terminal agent rather than the editor extension, see the Claude Code setup guide — it is configured through environment variables instead of a settings panel, and Claude Code pricing works through the subscription-versus-API break-even.