June 22, 20263 min readSetupCline

How to use Cline through one API

Cline is one of the most capable AI coding agents for VS Code: it reads your repo, plans changes, runs commands, and edits files across your project. But it gets expensive and awkward fast when every model you want to try lives behind a separate provider, billing dashboard, and API key. AnyModel fixes that by putting every major model behind one OpenAI-compatible endpoint.

Why route Cline through one API

Cline lets you pick a model per task — a cheap one for boilerplate, a frontier one for tricky refactors. With AnyModel you keep that flexibility without juggling accounts. One API key reaches GPT, Claude, Gemini, DeepSeek, GLM, Kimi, Qwen, and Grok. To switch models you change the model id in Cline's settings; nothing else moves.

Other benefits that matter for an agent like Cline:

  • No subscription, no minimums. You pay per token. Idle weeks cost nothing.
  • One bill instead of five provider invoices.
  • Fast comparison. Run the same task on two models and see which writes better diffs. Browse the full lineup on the models page or use the compare view to weigh price and capability.

Set up Cline with AnyModel

Cline isn't covered by our one-line installer (that's reserved for codex, claude, opencode, and hermes), so you'll use the standard OpenAI-compatible configuration. It takes about a minute.

  1. Open VS Code and install the Cline extension from the marketplace.
  2. Click the Cline icon, then open its settings (the gear).
  3. For API Provider, choose OpenAI Compatible.
  4. Fill in the fields:
Field Value
Base URL https://anymodel.org/v1
API Key your AnyModel key
Model ID e.g. claude-sonnet-4-5, gpt-5, deepseek-v3
  1. Save. Cline now sends every request through AnyModel.

That's the whole integration. Because the endpoint speaks the OpenAI Chat Completions format, Cline treats it like any other OpenAI-style backend — including streaming and tool calls.

Verify it works

Before driving Cline, you can confirm the key and endpoint with a quick curl from your terminal:

curl https://anymodel.org/v1/chat/completions \
  -H "Authorization: Bearer $ANYMODEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5","messages":[{"role":"user","content":"Say hello from Cline"}]}'

A normal JSON response means Cline will work too. If you get a 401, recheck the key; a 404 usually means a typo in the model id.

Switching models mid-project

The point of one API is that experimentation is free of friction. Drafting a large feature? Point Cline at a frontier model. Running repetitive edits across dozens of files? Drop to a cheaper model and save tokens. Just edit the Model ID field — your base URL and key stay the same. Some teams keep two Cline profiles configured so they can flip between a "planner" model and a "doer" model without retyping anything.

Privacy for code you care about

Coding agents send a lot of context: file contents, configs, sometimes secrets. If retention on our side is a concern, enable Ghost Mode — opt-in, zero-retention API keys where prompts and responses aren't stored by AnyModel; only a token counter runs for billing. Be honest with yourself about the limits, though: the underlying model provider still receives the prompt to generate a response, so this isn't absolute privacy — it's about removing our copy from the loop.

What it costs to start

You can wire up Cline and ship real changes without entering a card:

  • 1,000,000 free tokens on signup.
  • 6,000,000 total if you link Telegram.
  • After that, pay-per-token — no subscription, no minimums.

For an agent that reads and rewrites code all day, a few million tokens is enough to genuinely evaluate which models suit your codebase. Want more setup walkthroughs and model deep-dives? The blog covers other tools and workflows.

Get started

Create an account, grab your key, paste the base URL and model id into Cline's OpenAI-compatible settings, and you're coding against every major model through a single endpoint.

Sign up and get your free tokens

Read next