How to use Cline with a custom Anthropic or OpenAI-compatible endpoint
Point Cline at a third-party API: the Anthropic provider with Use custom base URL, or OpenAI Compatible with /api/v1. Covers Model ID, Plan/Act models and $0 costs.
Copy-paste configuration
These are the three values the tool needs. Create the API key on the API Keys page of your CCSub dashboard.
- Anthropic: custom base URL
https://www.ccsub.net(tick Use custom base URL first)- OpenAI Compatible: Base URL
https://www.ccsub.net/api/v1- API Key
sk-your-ccsub-key- Model / Model ID
claude-sonnet-5
For model, use an ID such as claude-sonnet-5 — the full list of model IDs is on the models page. No key yet? Create an account first.
Steps at a glance
- 1
Install Cline and create a CCSub key
Install Cline from the VS Code marketplace and create an sk- key on the API Keys page of the CCSub dashboard.
- 2
Open API Configuration
Open the Cline sidebar, click the gear icon at the top right and go to API Configuration.
- 3
Pick a provider and set the URL
For Anthropic, tick Use custom base URL and enter https://www.ccsub.net. For OpenAI Compatible, set Base URL to https://www.ccsub.net/api/v1.
- 4
Add the key and choose a model
Paste the CCSub key into the provider's API key field. Pick a Model from the Anthropic dropdown, or choose or type a Model ID such as claude-sonnet-5 for OpenAI Compatible.
- 5
Verify
Run a small task in Cline and check the request and its real cost on the Usage page of the CCSub dashboard.
Cline is an open-source coding agent that runs inside VS Code: it reads and edits files, runs commands and asks before it acts. It supports many API providers, and two of them work with CCSub: Anthropic (with a custom base URL) and OpenAI Compatible. Both use the same CCSub key, so pick whichever suits you.
Where the settings are
Click the Cline icon in the VS Code activity bar, then the gear icon at the top right of the Cline panel, and open API Configuration. Choose the provider from the API Provider dropdown.
Option 1: the Anthropic provider
- API Provider
Anthropic- Anthropic API Key
sk-your-ccsub-key- Use custom base URL
https://www.ccsub.netTick the box to reveal the field (placeholder: Default: https://api.anthropic.com).- Model
claude-sonnet-5Chosen from the dropdown.
The bare domain is enough: when the URL has no path, Cline adds /v1 and the request lands on https://www.ccsub.net/v1/messages. The trade-off is that the Model field is a fixed dropdown of models Cline knows about — you cannot type an ID. If the model you want is not listed, use option 2.
Option 2: OpenAI Compatible
- API Provider
OpenAI Compatible- Base URL
https://www.ccsub.net/api/v1Cline appends /chat/completions.- OpenAI Compatible API Key
sk-your-ccsub-key- Model ID
claude-sonnet-5Pick from the list fetched from CCSub, or choose Use custom model ID.
The Model ID dropdown is populated from https://www.ccsub.net/api/v1/models, so if the Base URL is right you will see CCSub's models straight away. The model field takes IDs such as claude-sonnet-5; the full list is on the models page.
Should you fill in MODEL CONFIGURATION?
Under OpenAI Compatible there is a collapsible MODEL CONFIGURATION section with Supports Images, Context Window Size, Max Output Tokens, Input Price / Output Price and Temperature. A few notes:
- Prices default to 0, which is why Cline's task header shows $0.00. That does not mean nothing was charged — the CCSub Usage page has the real numbers. Copy the per-token prices from the models page if you want Cline's estimate to be closer.
- Supports Images needs to be ticked if you want to paste screenshots into the chat.
- Custom Headers can stay empty.
Plan and Act can use different models. In API Configuration, tick Use different models for Plan and Act modes. Cline then shows separate Plan Mode and Act Mode tabs, each with its own provider and model, and both can use CCSub with the same key.
A version to avoid
Cline 4.1.22 had a regression where the Anthropic provider returned 400 errors whenever a custom base URL was set. It was fixed in 4.1.23, so update the extension first if you see this.
Verify
Save the settings and give Cline a small task, such as "list the files in this folder". Then open the Usage page in your CCSub dashboard; if the request and its real cost appear, you are connected. Setting up a similar extension? Compare with the Kilo Code guide and the Continue guide.
Common errors and fixes
400 errors only with Anthropic + custom base URL
Cause:A regression in Cline 4.1.22 broke custom Anthropic base URLs; 4.1.23 fixed it.
Fix:Update Cline to 4.1.23 or later.
The Model ID dropdown is empty
Cause:Cline could not fetch {Base URL}/models because the Base URL is wrong.
Fix:Set Base URL to https://www.ccsub.net/api/v1, or choose Use custom model ID and type the ID.
401 authentication_error: Missing or invalid API key
Cause:The key went into a different provider's field, or picked up whitespace.
Fix:Make sure the selected API Provider matches the field you pasted into, and paste again.
404 Unknown model
Cause:A typo in a manually entered model ID.
Fix:Copy the ID from the models page; IDs use hyphens.
For more error messages and what they mean, see the error troubleshooting index. Installation and network issues are covered in the troubleshooting docs (Chinese).
FAQ
Anthropic or OpenAI Compatible — which should I use?
Either works. The Anthropic provider only offers models from Cline's built-in dropdown, while OpenAI Compatible lists the models CCSub returns and also accepts a typed model ID, so it is more flexible.
Does the Anthropic custom base URL need /v1?
No. Enter https://www.ccsub.net; when the URL has no path, Cline adds /v1 itself. https://www.ccsub.net/v1 also works, but avoid doubled paths like /api/v1/v1.
Why does Cline show $0.00 for every task?
OpenAI Compatible's MODEL CONFIGURATION defaults the input and output prices to 0, so Cline estimates zero. Your real charges are on the CCSub Usage page; enter the per-token prices yourself if you want Cline's estimate to be closer.
Can Plan and Act mode use different models?
Yes. Tick Use different models for Plan and Act modes to get separate Plan Mode and Act Mode tabs, each with its own provider and model. Both can point at CCSub with the same key.
What do I enter as the model?
IDs such as claude-sonnet-5; the full list is on the CCSub models page.
Related setup guides
Need a CCSub API key?
Sign up, create a key in the dashboard, and paste the values above into your tool. Pay-as-you-go balance does not expire — you only pay for the tokens you use.