Cline is a VS Code extension that can read files, edit code, and run terminal commands with your approval. It also exposes an OpenAI Compatible provider, which makes it a better fit for a custom gateway than an editor that only supports its own models. Setup is six fields in the Cline settings panel, and every model request — Claude included — goes through the provider you configure.
Written 2026-10-27. Cline's labels vary slightly between releases; use the field names your version shows. This is an independent setup guide, not a Cline product page.
Why Cline is a good fit for a custom API
The OpenAI Compatible provider is a first-class setting, not a hidden override. You give Cline a base URL, a key, and a model ID, and it sends OpenAI-format chat-completion requests to that endpoint. That is the same shape as the JZS API, so there is no translation layer on your side.
The second advantage is visibility. Cline shows token usage and cost per request in the task view, and it asks before running tools that change files or execute commands. For a gateway, that matters: an agent loop can generate many requests for one user prompt, and you want to see the multiplier instead of discovering it on the balance page.
What you need
| Item | Value | Notes |
|---|---|---|
| VS Code | Current stable | Cline also ships for VS Code-compatible editors; the settings are the same. |
| Cline extension | From the VS Code Marketplace | Install, reload the window, then open Cline from the sidebar. |
| API key | sk-… | Create it in Dashboard → API Keys. A Standard key covers the catalog except jzs-max-3.0. |
| Base URL | https://jzstoken.com/api/v1 | No trailing slash and no /chat/completions suffix. |
| Model ID | claude-sonnet-5, gpt-5.6-terra, … | Exact catalog ID, no vendor prefix. |
Step 1: install and open Cline
Open the Extensions panel in VS Code, search for Cline, and install the extension published by Cline. Reload the window if VS Code asks. Click the Cline icon in the Activity Bar to open the task panel, then click the settings gear in the panel header.
If the extension does not appear after installation, check that it is enabled for the current workspace and that VS Code is not running in a restricted mode that disables extensions. A restricted workspace can also block Cline from reading files, which looks like a model failure but is a permission problem.
Step 2: choose the OpenAI Compatible provider
In the Cline settings panel, find API Provider and select OpenAI Compatible. Do this even when you plan to call Claude models. The gateway accepts OpenAI-format chat requests and routes the model you name; choosing the Anthropic provider would send a different request format and is not the path this guide covers.
Step 3: enter the base URL and key
Put the API base URL in the Base URL field and your JZS key in the API Key field:
API Provider: OpenAI Compatible Base URL: https://jzstoken.com/api/v1 API Key: sk-your-key-here Model ID: claude-sonnet-5
Use the API base URL, not the full endpoint. https://jzstoken.com/api/v1/chat/completions will produce a doubled path when Cline appends its own endpoint. A trailing slash is also worth removing if the connection test fails.
Step 4: enter the model ID
Cline's model field takes the exact ID from the catalog. Labels such as “Claude Sonnet 5” are display names, not IDs. Start with one of these:
| Model ID | Best for | Context | Images | JZS in / out per 1M |
|---|---|---|---|---|
| claude-sonnet-5 | Default for agentic coding | 1M | Yes | $0.7784 / $3.8922 |
| claude-opus-5 | Hard refactors and architecture | 1M | Yes | $1.1677 / $5.8383 |
| gpt-5.6-terra | Cheap general coding and review | 258K | Yes | $0.2335 / $1.4012 |
| deepseek-v4-pro | Budget long-context work | 1M | No | $0.4491 / $2.2455 |
| qwen3.7-max | Long-context alternative | 1M | No | $0.7784 / $2.3353 |
Image support in the table describes the model, not Cline. If you paste a screenshot into a task, use a model whose row says Yes; DeepSeek V4 Pro and Qwen3.7 Max are text-only at the captured catalog data. The catalog also lists versioned variants such as claude-sonnet-5.5 at the same Sonnet price; use the ID that resolves in your account rather than assuming a dot or hyphen variant works.
Step 5: save and test
Click Save and start a new task. Ask for a read-only action first so a model or tool problem cannot modify the repository:
> read the top-level files in this workspace and summarize what the project does. Do not edit files or run commands.
If the answer streams back and Cline shows token usage, the provider, key, and model are correct. Then ask for a one-file change and approve the diff manually. Approval prompts are the point of Cline: leave auto-approve off until you have watched a full task and know how many requests it generates.
What the same tokens cost on both gateways
Cline is model-agnostic, so the gateway comparison depends on the model you pick. This table uses the shared 3:1 input/output blend, standard non-batch rates, and no cache:
| Model | OpenRouter in / out | JZS in / out | 3:1 blended (OR → JZS) | JZS saves |
|---|---|---|---|---|
| GPT-5.5gpt-5.5 | $5.00 / $30.00 | $0.39 / $2.34 | $11.250 → $0.876 | 92.2% |
| Claude Sonnet 5.5claude-sonnet-5.5 | $2.00 / $10.00 | $0.78 / $3.89 | $4.000 → $1.557 | 61.1% |
| DeepSeek V4 Prodeepseek-v4-pro | $0.96 / $1.91 | $0.45 / $2.25 | $1.194 → $0.898 | 24.8% |
| Qwen3.7 Maxqwen3.7-max | $1.48 / $4.42 | $0.78 / $2.34 | $2.213 → $1.168 | 47.2% |
| Gemini 4 Argongemini-4-argon | $2.00 / $10.00 | $0.39 / $1.95 | $4.000 → $0.778 | 80.5% |
USD per 1M tokens, standard (non-batch) routes, captured 2026-10-26. Blended assumes 3 input tokens per output token. OpenRouter batch routes are often half price and are not compared here.
Sources: JZS public pricing API and OpenRouter public model list, both read on 2026-10-26. Prices move; check both pages before you commit to a provider.
Agent tasks are not one request. Cline resends the conversation each time it calls a tool, so a task that reads five files and runs two commands can produce eight or more billed requests. The token totals in Cline's task view include that replay; use them, not the size of your first prompt, to estimate the bill.
| Model | JZS / month | OpenRouter / month | You keep |
|---|---|---|---|
| GPT-5.6 Terra | $5.14 | $44.00 | $38.86 |
| Claude Sonnet 5 | $15.57 | $40.00 | $24.43 |
| DeepSeek V4 Pro | $8.98 | $13.37 | $4.39 |
| Claude Opus 5 | $23.35 | $80.00 | $56.65 |
10M input + 2M output, USD, standard non-batch rates. GPT-5.6 Terra's prices were read on 2026-10-27; OpenRouter lists it at $2.00 / $12.00 per 1M. The other rows use the shared comparison data captured 2026-10-26. These are list-price estimates, not a quote.
Tool use is the real cost multiplier
A chat request sends a prompt and gets an answer. An agent request sends a prompt, gets a tool call, executes it, sends the result plus the entire conversation back, and repeats. Each loop is another request with a larger input. That is why a task that feels like one question can cost several times a plain chat message on the same model.
Cline shows this clearly in the task view: request count, input tokens, output tokens, and an estimated cost. Treat that estimate as a relative signal. The authoritative number is the usage page, because the gateway prices cache hits, images, and output tokens using the model's actual rates. If a task starts to loop — the model keeps retrying the same command or re-reading the same file — stop it and rephrase the task rather than letting it run.
Choosing a model for Cline
Claude Sonnet is the default
Sonnet has the most predictable tool-call behaviour in this catalog and is fast enough for interactive editing. At $0.7784 input / $3.8922 output per 1M, a normal multi-step task is cheap relative to the engineering time it saves. Start here, not with the cheapest model.
Use Opus for hard decisions, not every edit
Opus costs 50% more than Sonnet on both input and output. It is worth it for a difficult refactor, an unfamiliar codebase, or a design decision where a wrong edit costs more than the tokens. Using it for every file read is the fastest way to make an agent bill look unreasonable.
Use Terra when the task is bounded
GPT-5.6 Terra is the value option: $0.2335 input / $1.4012 output, a 258K context window, and image support. It is a good fit for review, summarization, and single-file changes. It is not a drop-in replacement for Sonnet on long, tool-heavy tasks; test the specific workflow before switching a whole team.
Use DeepSeek V4 Pro for long text, not images
DeepSeek V4 Pro has a 1M context and a low blended price, which makes it attractive for reading large files. It does not accept images at the captured catalog data, so it is a poor choice for screenshot-driven tasks. Its output rate is close to OpenRouter's; the saving is mostly on input.
Keeping the bill predictable
- Leave auto-approve off. Every file edit and terminal command is a chance to stop a runaway task.
- Start a new task when the work changes. Cline resends the conversation, so an old task keeps paying for old context.
- Use Sonnet for the loop and Opus only for a specific hard step.
- Watch request count, not just token count; a cheap model that needs three retries can cost more than one Sonnet call.
- Check the usage page after the first day and compare it to Cline's estimate; use the larger number for budgeting.
- Do not run a long agent task on a model you have not tested on a one-file task first.
Troubleshooting
| Symptom | Fix |
|---|---|
| 401 Unauthorized | Re-paste the key and remove whitespace. Confirm the key is still listed in Dashboard → API Keys. |
| 404 Not Found | The base URL is wrong. Use https://jzstoken.com/api/v1 with no trailing slash and no /chat/completions suffix. |
| 403 model_not_supported | The model ID is not in the catalog, or the key type does not cover it. A Standard key cannot call jzs-max-3.0. |
| 402 insufficient balance | Add credit; Cline's request estimate is higher than the remaining balance. |
| 400 model not found | The model ID has a typo or a vendor prefix. Copy the exact ID from the pricing page. |
| Tool calls fail but chat works | The model may not support the tool-call format. Try Claude Sonnet on the same task before changing the gateway settings. |
| Cline cannot read files | Check that VS Code is not in a restricted workspace and that the extension has permission for this folder. |
Security notes
Cline can read your workspace and run terminal commands. The model provider only generates the request; Cline executes the tool locally after you approve it. Read the diff and the command before approving, especially for shell commands that delete files, rewrite history, or touch credentials.
The API key is stored in the extension's local settings. Use a separate key per machine or per developer, and do not put it in a repository-level settings file that gets committed. If you paste a screenshot into Cline, remember that the image is sent to the gateway and then to the upstream provider; do not include secrets or customer data you would not send to an API.
Cline or Cursor?
Cline is the safer choice when the priority is a custom gateway that covers every model request. It is also easier to inspect: the provider setting is explicit, and the task view shows the request count. Cursor is the stronger editor when its build exposes a base-URL override and the features you use stay inside that path.
The Cursor setup and its version-dependent limits are covered in How to use Cursor with a custom API. If you are comparing gateway prices before choosing a client, start with the cheapest LLM API ranking.
FAQ
Is Cline the same as Claude Dev?
Cline was formerly called Claude Dev. The extension and the provider settings described here are the current Cline extension. If you have the old extension installed, remove it and install Cline from the marketplace to avoid two panels with similar names.
Can I use Claude models with the OpenAI Compatible provider?
Yes. The provider describes the request format, not the model vendor. The gateway accepts the OpenAI-format request, reads the model ID, and routes it to the Claude model you named. Pick the exact ID from the catalog.
Why do I get 403 for a model that exists?
Two common causes: the key type does not cover the model, or the model ID is not active for your account. A key created specifically for jzs-max-3.0 can only call that model; use a Standard key for everything else.
Does Cline support image input?
Cline can attach images, but the model must accept them. At the captured catalog data, Claude Sonnet, Claude Opus, and GPT-5.6 Terra support images; DeepSeek V4 Pro and Qwen3.7 Max do not. If an image request fails, check the model row before changing the provider.
Why is my Cline bill higher than the token estimate?
Agent tasks make many requests. Each tool call resends the conversation, so input tokens grow with every step. Cline's estimate is useful for comparing tasks, but the gateway's usage page is the authoritative bill. Start a new task when the context stops being relevant.
Try Cline with JZS
Create a key, choose OpenAI Compatible, and run a read-only task first. The live catalog shows the input, output, and context price for every model before you switch a whole workflow.
Get an API keyCompare models