Kilo Code, Cline, and Roo Code are the most widely used open-source coding agents inside VS Code—and all three accept a custom OpenAI-compatible endpoint. That means you can run Claude inside your editor with a single sk-kn- key, at about 30% below Anthropic's official rates on the main models. This guide gives you the three-field setup for each tool, which Claude model to choose for each task type, the actual cost of an agentic coding session, and how to pay from Brazil with Pix, without an international card.
Why do these tools ask for an API key?
Kilo Code, Cline, and Roo Code do not bundle any models: every action (reading a file, suggesting a change, running a command, checking the result) is an API call billed per token. A chat subscription such as Claude Pro does not cover this—you need direct API access. That is exactly what Kunavo is for: pay-as-you-go starting with a $10 top-up, one key for Claude and GPT, a balance that never expires, and payment from Brazil by Pix or card (the full context on latency, LGPD, and tax invoices is in the Claude API in Brazil guide). Since the agentic loop resends context at every step, the per-token rate is the first cost lever for a session.
The three fields (same for all three tools)
All three extensions share the same provider model—Kilo Code and Roo Code are forks in the Cline family—so the configuration is identical:
API Provider OpenAI Compatible
Base URL https://api.kunavo.com/v1
API Key sk-kn-... # criada em kunavo.com/app/keys
Model ID claude-sonnet-5 # ou claude-opus-5 / claude-haiku-4-5Create a key in the dashboard after signing up and adding $10; it is shown only once, so save it immediately.
Configure Kilo Code
- Install Kilo Code from the VS Code marketplace and open its panel in the sidebar.
- Open the extension settings (gear icon), under Providers.
- Set API Provider to OpenAI Compatible.
- Base URL:
https://api.kunavo.com/v1· API key: yoursk-kn-…· model:claude-sonnet-5. - Save and test with a simple request (“explain this file”) before letting the tool edit code.
Kilo Code allows a different model for each mode (Architect / Code / Debug)—useful for assigning planning to a stronger model and execution to a cheaper one.
Configure Cline
- Install Cline and open its panel.
- Click the settings gear and, under API Provider, choose OpenAI Compatible.
- Enter the same three values: base URL
https://api.kunavo.com/v1, your key, and model IDclaude-sonnet-5. - If Cline asks for model metadata (context window, output limit), use the figures on the model page.
Configure Roo Code
Same as the other two: Settings → Providers → API Provider → OpenAI Compatible, then enter the base URL https://api.kunavo.com/v1, key, and model ID. Roo Code's mode system (Code / Architect / Ask / Debug) also supports a model per mode.
All three tools also offer a native Anthropic provider with a custom base URL option. Pointing it to https://api.kunavo.com uses the native Messages API (/v1/messages), which is useful because cache_control goes straight through and cached input is billed at 10% of the input rate (see the prompt caching documentation). Both routes work; the OpenAI-compatible one is the easiest way to get started.
Paying from Brazil — Pix, no international card
The issue that blocks most Brazilian developers is not configuration but payment: paying Anthropic for the API directly requires an international credit card enabled for purchases abroad. At Kunavo, payment is processed by Stripe, and Pix appears as a payment method for those paying from Brazil—the amount is displayed in reais and credited instantly, without relying on an international card. International cards (Visa, Mastercard, and American Express), Apple Pay, Google Pay, and Link also work normally.
Token rates are set in USD: with Pix (and with a card when checkout is displayed in reais), Stripe shows the conversion to reais before you confirm, and this rate includes a 2–4% currency-conversion cost paid by the buyer; if you choose to pay by card in dollars, this cost disappears and the conversion follows the issuer’s rate (check your bank’s IOF and international transaction fee in its app)—the step-by-step Pix top-up process is in the guide to paying for the API with Pix. It is a prepaid wallet: the minimum top-up is $10, there is no monthly fee, and the balance never expires—so a month without coding costs nothing, unlike a subscription.
Which Claude model should you choose?
| Task | Model | Kunavo input / output (per 1M) |
|---|---|---|
| Everyday agentic coding (default) | claude-sonnet-5 | $1.40 / $7.00 |
| Previous generation, for prompts already tuned to it | claude-sonnet-4-6 | $2.10 / $10.50 |
| Difficult refactors and debugging | claude-opus-5 | $3.50 / $17.50 |
| Small changes, commit messages | claude-haiku-4-5 | $0.70 / $3.50 |
The model field is just a slug on the same endpoint: switching models means changing one word—no new key, no new provider. Full rates are in the Claude API pricing guide and on the pricing page.
The actual cost of a session
Agentic tools consume many tokens by design: each step resends the system prompt, task history, and file context. Realistic figures at Kunavo rates:
| Unit | Tokens (input / output) | claude-sonnet-5 | At Anthropic rates |
|---|---|---|---|
| One agent step | 25.000 / 1.200 | $0.043 | $0.062 |
| A 20-step task | ~500K / ~24K | ~$0.87 | ~$1.24 |
| A heavy day (5 tasks) | — | ~$4.34 | ~$6.20 |
That means a $10 Pix top-up covers about 11 20-step agentic tasks on Sonnet 5. Run the calculation yourself:
# Tarifas Claude na Kunavo (USD por 1M de tokens): (input, output)
RATES = {
"claude-haiku-4-5": (0.70, 3.50),
"claude-sonnet-5": (1.40, 7.00),
}
def custo_passo(model, in_tokens, out_tokens):
i, o = RATES[model]
return in_tokens / 1_000_000 * i + out_tokens / 1_000_000 * o
# Um passo do agente: a ferramenta reenvia o contexto + os arquivos lidos.
print(custo_passo("claude-sonnet-5", 25_000, 1_200)) # -> $0.0434
# Uma tarefa realista de 20 passos (editar, rodar, corrigir, repetir):
print(20 * custo_passo("claude-sonnet-5", 25_000, 1_200)) # -> ~$0.87Portuguese uses ~10–20% more tokens than English for the same content—keep this in mind when your prompt and code comments are in Portuguese.
How to keep your bill low
- Start new tasks instead of stretching the same one. The tool resends the entire conversation at every step: an endless task grows quadratically in cost. New task = short context.
- Route by mode. Kilo Code and Roo Code accept one model per mode—Architect on
claude-opus-5, Code onclaude-sonnet-5, quick questions onclaude-haiku-4-5. - Use the native Anthropic route for caching. Cached input is billed at 10% of the rate—in a loop that resends a stable prefix at each step, this is the biggest available saving (how it works).
- Track spend by key. Give your editor its own key with a spending limit in the dashboard, and check the usage panel to see what a week of agentic coding actually costs.
Frequently asked questions
What base URL should I use in Kilo Code with the Claude API?
Choose the “OpenAI Compatible” provider and enter the base URL https://api.kunavo.com/v1, with a Kunavo key (sk-kn-...) and a Claude model slug such as claude-sonnet-5. The same three fields work in Cline and Roo Code. For the native Anthropic provider, use https://api.kunavo.com (the SDK adds /v1/messages).
Can I use Kilo Code in Brazil without an international card?
Yes. The Kunavo wallet is topped up through Stripe, and Pix appears as a payment method for those paying from Brazil—the amount is displayed in reais and credited instantly, without relying on an international card enabled for purchases abroad. Token rates are set in dollars; the minimum top-up is $10 and the balance does not expire. International cards (Visa, Mastercard, and American Express), Apple Pay, Google Pay, and Link also work.
Does my Claude Pro subscription work for Kilo Code?
No—chat subscriptions do not include API access. Kilo Code, Cline, and Roo Code call the API directly and charge per token. With Kunavo, you can top up from $10, Claude is served at 30% below Anthropic's list price depending on the model, and the balance never expires.
Which Claude model should I choose in Kilo Code?
claude-sonnet-5 ($1.40/$7.00 per 1M tokens on Kunavo) is the default choice for everyday agentic coding: near-frontier code quality at a lower per-token rate than claude-sonnet-4-6 ($2.10/$10.50) on Kunavo. Move up to claude-opus-5 for the hardest refactors. Send simple questions to claude-haiku-4-5. Full rates are in the Claude API pricing guide.
How much does a Claude coding session cost?
Agentic tools resend context at every step: a typical step uses ~25 thousand input tokens and 1.2 thousand output tokens, or about $0.043 on claude-sonnet-5 at Kunavo rates—around $0.87 for a 20-step task, compared with ~$1.24 at Anthropic's official rates. Failed requests are not charged.
What if I prefer the terminal to VS Code?
The same reasoning applies to Claude Code and Codex CLI, which also accept a custom endpoint: see how much Claude Code costs and Codex CLI with an API key.