Setup guide

Connect Roo Code

Roo Code is an AI coding agent that runs inside VS Code. It connects to CheapTokens through its OpenAI Compatible provider.

Before you start

The snippets below use claude-sonnet-5-5. Pick another model to update them.

Steps

  1. Install the Roo Code extension. In VS Code open Extensions (Ctrl+Shift+X, or Cmd+Shift+X on macOS) and search for it, or run this in a terminal:
    Terminal
    code --install-extension RooVeterinaryInc.roo-cline
  2. Open the Roo Code panel from the VS Code side bar and click the gear icon to open its settings.
  3. Set API Provider to OpenAI Compatible, then fill in these fields:
    Roo Code settings
    Base URL:  https://cheaptokens.pw/v1
    API Key:   YOUR_API_KEY
    Model:     claude-sonnet-5-5
  4. Under Model Configuration, set Context Window to 200000 and Max Output Tokens to 8192. Roo Code can't look these up for a custom model.
  5. Click Save, then Done, and send a message in the Roo Code panel.

Check that it works

Send a short message in Roo Code, then open Dashboard → Usage. The request appears there within a few seconds, with its model, tokens and cost.

Good to know

If something goes wrong

What you seeWhat to do
401 or invalid_api_keyThe key is wrong, disabled or has extra spaces. Create a new key and paste it again.
402 or insufficient_quotaYour balance is empty. Top up under Billing.
404 or model_not_foundThe model ID has a typo. Copy it from the models page.
404 on every requestThe base URL is wrong. Check whether this tool needs the /v1 ending (see the steps above).
429Too many requests per minute. Wait a few seconds and retry.

Prefer a guided version? Open the setup wizard →