Setup guide
Connect Cline
Cline is an open-source AI coding agent for VS Code, Cursor and JetBrains IDEs. It connects to CheapTokens through its OpenAI Compatible provider.
Before you start
- A CheapTokens account with some balance. Create one if you haven't.
- Your API key from Dashboard → API key. It starts with
ct_live_. - Any text model from the models page. They all work over the OpenAI Chat Completions format.
The snippets below use claude-sonnet-5-5. Pick another model to update them.
Steps
-
Install the Cline extension. In VS Code open Extensions (
Ctrl+Shift+X, orCmd+Shift+Xon macOS) and search for it, or run this in a terminal:Terminalcode --install-extension saoudrizwan.claude-dev
-
Open the Cline panel from the VS Code side bar and click the gear icon to open its settings.
-
Set API Provider to
OpenAI Compatible, then fill in these fields:Cline settingsBase URL: https://cheaptokens.pw/v1 API Key: YOUR_API_KEY Model ID: claude-sonnet-5-5
-
Under Model Configuration, set Context Window to
200000and Max Output Tokens to8192. Cline can't look these up for a custom model. -
Click Verify, then Done, and give Cline a task.
Check that it works
Send a short message in Cline, then open Dashboard → Usage. The request appears there within a few seconds, with its model, tokens and cost.
Good to know
- In JetBrains IDEs, install Cline from the plugin marketplace. The settings are the same.
- Cline needs a model that supports tool calling. If a model replies but never edits files, try another one.
- You can set different models for Plan and Act mode in the same settings screen.
If something goes wrong
| What you see | What to do |
|---|---|
401 or invalid_api_key | The key is wrong, disabled or has extra spaces. Create a new key and paste it again. |
402 or insufficient_quota | Your balance is empty. Top up under Billing. |
404 or model_not_found | The model ID has a typo. Copy it from the models page. |
| 404 on every request | The base URL is wrong. Check whether this tool needs the /v1 ending (see the steps above). |
| 429 | Too many requests per minute. Wait a few seconds and retry. |
Prefer a guided version? Open the setup wizard →