Using Cline and Roo Code with a Claude-Compatible API
Why this guide exists
Claude Code is the CLI, but a lot of developers prefer working inside their editor — and for that, Cline and Roo Code (a Cline fork) are the two most popular VS Code extensions. Both speak Anthropic's protocol, which means both work with LLM API the same way Claude Code does. This is the exact setup.
You'll need a key from the dashboard (format sk-relay-…) and our base URL: https://llmapi.pro/v1.
Cline: the Anthropic-compatible path (recommended)
Cline has a native Anthropic provider with a custom base URL option. This is the cleanest route because it uses the same wire format Claude was built around.
- Open Cline's settings (the gear icon in the Cline panel).
- API Provider → select Anthropic.
- Check Use custom base URL.
- Set the base URL to:
https://llmapi.pro/v1 - API Key → paste your
sk-relay-…key. - Model → pick one of:
claude-opus-4-8(strongest)claude-sonnet-4-6(best default)claude-haiku-4-5-20251001(fast/cheap)
Save, open a new task, and Cline will route through us. Tool use — file edits, terminal commands, the whole agentic loop — works end to end.
Cline: the OpenAI-compatible path (fallback)
If your Cline version doesn't expose a base-URL field under Anthropic, use the OpenAI-compatible provider instead. We expose /v1/chat/completions alongside the Anthropic endpoint, so this works too:
- API Provider → OpenAI Compatible.
- Base URL →
https://llmapi.pro/v1 - API Key → your
sk-relay-…key. - Model ID →
claude-sonnet-4-6(type it manually if it's a free-text field).
Both paths reach the same models. The Anthropic path is slightly preferred because Cline's prompt formatting was tuned for it, but in practice the difference is small.
Roo Code
Roo Code is a fork of Cline, so the flow is nearly identical:
- Open Roo Code settings → Providers.
- Select Anthropic and enable the custom base URL field (or OpenAI Compatible as the fallback).
- Base URL:
https://llmapi.pro/v1 - API key:
sk-relay-… - Model:
claude-opus-4-8/claude-sonnet-4-6/claude-haiku-4-5-20251001
If you run multiple "modes" in Roo Code (Architect, Code, Ask), a good split is Opus 4.8 for Architect and Sonnet 4.6 for Code — same logic as picking models in Claude Code itself.
Common gotchas
401 Unauthorized— the key is wrong or has a stray space. Re-paste it;sk-relay-…keys have no surrounding quotes.404on the model — typo in the model ID, or you used a display name ("Claude Opus 4.8") instead of the ID (claude-opus-4-8). Use the ID.- Base URL with a trailing path — use exactly
https://llmapi.pro/v1. Don't append/messagesor/chat/completions; the extension adds the route itself. Adding it yourself produces a doubled path and a 404. - Streaming looks stalled on long turns — that's the model thinking before it emits, not a hang. Both endpoints stream normally; give it a few seconds on a hard prompt.
- Rate-limit / 429 errors — usually a sign of a saturated session, not a dead key. Our 429 troubleshooting guide applies to Cline and Roo Code too.
Which editor tool should you use?
- Cline — the most mature, biggest community, most stable.
- Roo Code — faster-moving fork with extra modes and customization; great if you like the bleeding edge.
- Claude Code (CLI) — if you live in the terminal. See the API key setup guide.
All three hit the same endpoint and the same models — pick the interface you like and reuse the one key across all of them.
llmapi.pro is an independent, Claude-compatible API relay; we are not affiliated with Anthropic, Cline, or Roo Code. Product names are used for identification only.