Use the Claude API in VS Code
Setting up the Claude API in VS Code comes down to a single setting: free extensions like Cline and Continue accept any Anthropic-compatible endpoint. Point one at https://router.apitoken.sale with an apiToken.sale key and Claude edits, answers and reviews inside the editor, billed per token from prepaid balance at 50% off official API pricing.
·
One base URL and one key is the entire integration
For terminal harnesses, use curl -fsSL https://apitoken.sale/setup/connect.sh | bash; Windows PowerShell uses irm https://apitoken.sale/setup/connect.ps1 | iex. The setup writes private files and imports the complete provider model list.
You do not need an Anthropic Console account to run Claude inside VS Code. The free Cline and Continue extensions both accept any Anthropic-compatible endpoint, so the whole job is pointing them at https://router.apitoken.sale, pasting your apiToken.sale key and choosing a model. From that moment Claude answers questions, edits files and reviews diffs without leaving the editor, billed per token from your prepaid balance at a flat 50% off official API pricing.
Nothing exotic happens under the hood. The extension sends ordinary Anthropic Messages requests with an x-api-key header to the gateway; the gateway authenticates your sk-pool-… key, routes the call to the requested Claude model and meters the tokens. Because the wire protocol is untouched, the features these extensions rely on — streaming responses, tool use, large context windows — behave exactly as they would against Anthropic's own endpoint.
| Setting | What to enter |
|---|---|
| API provider | Anthropic (built into both extensions) |
| Base URL | https://router.apitoken.sale |
| API key | sk-pool-••• — generated in the apiToken.sale dashboard |
| Model | claude-opus-4-8 for hard tasks, claude-sonnet-5 for everything else |
| Cost | Per token from prepaid balance, 50% off official rates |
See also: Use a Claude API key in Cursor
Set up Cline in four steps
- 01Install Cline from the VS Code Marketplace and open its settings via the gear icon.
- 02Set API Provider to Anthropic and enable the custom base URL option.
- 03Paste https://router.apitoken.sale as the base URL and your sk-pool-••• key below it.
- 04Enter claude-opus-4-8 as the model, then run a small throwaway task to confirm the key works before trusting it with a real one.
# Cline → Settings API Provider : Anthropic Base URL : https://router.apitoken.sale API Key : sk-pool-••• Model : claude-opus-4-8
Keep autonomous Cline sessions cheap
Cline is the strong default when you want autonomous edits: give it a task and it reads files, plans, applies changes, runs terminal commands and re-checks its own diff in a loop until the job is done. That loop is exactly why per-token pricing matters — one task can mean dozens of Messages calls, and on a discounted gateway the same session costs half the official rate.
- Prompt caching is billed at the cheaper official cache rates minus your discount, so re-reading the same large files across turns costs a fraction of the naive price.
- Route routine chores to claude-sonnet-5 and reserve claude-opus-4-8 for the problems that genuinely need it — you can switch models mid-session without touching the key.
- Watch the dashboard: it shows token-level usage per request, so a runaway agent loop is visible before it eats the balance.
Point Continue at the same gateway
Continue is the lighter option: it shines at inline chat, quick edits and in-editor help rather than autonomous multi-file runs, and it is configured from a single file you can commit to a repo or sync across machines. Like Cline it is free — only the API usage touches your balance.
# ~/.continue/config.yaml
name: local
version: 1.0.0
schema: v1
models:
- name: Claude Opus 4.8 (apiToken.sale)
provider: anthropic
model: claude-opus-4-8
apiBase: https://router.apitoken.sale
apiKey: "{env:APITOKEN_API_KEY}"
roles: [chat, edit, apply]Older Continue releases read ~/.continue/config.json instead; the equivalent entry sets "provider": "anthropic", "apiBase": "https://router.apitoken.sale", "apiKey" and "model", and it still works. Keep the autocomplete role on a small dedicated model — Claude earns its tokens on chat, edit and apply.
Cline or Continue: pick by workflow, not by price
Both extensions are free and both bill the same prepaid balance, so the choice is purely about how you like to work. Many developers install both on one key: Cline for delegated tasks, Continue for quick questions and inline rewrites.
| Cline | Continue | |
|---|---|---|
| Best at | Autonomous multi-file tasks | Inline chat and quick edits |
| Interaction | Plan/act loop with approvals | Sidebar chat and inline edit |
| Token profile | Higher — read/edit/verify loops | Lower — mostly single-shot prompts |
| Extension price | Free | Free |
The same sk-pool-… key also works simultaneously in Cursor, Roo Code and the Anthropic SDK — one balance across every tool. If you split your time between VS Code and Cursor, the Cursor guide walks the same two-minute flow, and the model catalog lists every model the key unlocks.
The three errors everyone hits
- 401 Unauthorized: the key or the base URL is wrong. Re-paste the full sk-pool-… key and make sure the base URL is exactly https://router.apitoken.sale, with no extra path segment or typo.
- Model not found: the extension's bundled model list lags behind. Type a current ID explicitly — claude-sonnet-5 or claude-opus-4-8 — instead of picking a stale entry.
- Slow responses or 429: you are over the rate limit. Lower the extension's concurrency and respect the Retry-After header before resubmitting.
If a request fails mid-task in Cline, do not just retry the whole task — the agent keeps its plan, so resuming after fixing the key or model ID avoids paying for the same context twice.
Frequently asked questions
Which VS Code extensions work with an apiToken.sale key?
Any extension that supports an Anthropic-compatible endpoint, including Cline and Continue. Set the provider to Anthropic, override the base URL with https://router.apitoken.sale and paste your key.
Do I have to pay for Cline or Continue themselves?
No. Both extensions are free; you only pay for Claude API usage, drawn per token from your prepaid balance at 50% off official rates. Accounts created with Google or GitHub start with $5 of platform bonus credit.
What base URL do I enter for Claude in VS Code?
Set the Anthropic provider's custom base URL to https://router.apitoken.sale and use your sk-pool-… key from the apiToken.sale dashboard. The setting is identical in Cline and Continue.
Why does the extension say the model was not found?
Bundled model lists in extensions lag behind. Type a current model ID explicitly — claude-sonnet-5 or claude-opus-4-8 — rather than choosing a stale dropdown entry.
Can I use the same key in VS Code and Cursor at the same time?
Yes. One key works across Cline, Continue, Cursor, Roo Code and the Anthropic SDK simultaneously, all drawing on the same prepaid balance with token-level usage in the dashboard.
Use Google or GitHub to create your key and get $5 of platform bonus credit before you top up.