Cline + your own API key: 5-minute setup

Cline is a coding agent extension in VS Code: it reads your codebase, proposes edits, runs commands, and works through tasks in read-write-test loops. For that it needs one thing: access to an AI model through an API key.

Most tutorials stop at “sign up with a provider, enter a credit card”. This one doesn’t. The flow uses your own API key from Giant Router, paid via QRIS, with the budget limit you set yourself. If you’re comfortable with VS Code, every step below is done in minutes.

What you need

  • VS Code (or a fork: Cursor, VSCodium) with Cline installed from the marketplace.
  • Giant Router balance: Rp10,000 is enough for the first day. The top-up how-to is in paying for AI APIs in rupiah with QRIS.

The six setup steps

1. Create an API key with a budget limit. In the Giant Router dashboard, create a new API key and set its usage limit. For the first day, Rp10,000 is a sensible limit: enough for many small requests, and the key stops by itself if something is wrong.

2. Store the key somewhere safe. The key is shown once; copy it and keep it in a password manager or a local .env file that never goes into git. A leaked key = someone else’s usage on your balance; the budget limit is the emergency brake, but the right habit still holds: never commit keys.

3. Point Cline at the gateway. Open Cline’s settings, pick the “Anthropic” API provider (the request format is Anthropic-compatible), then fill in:

Base URL: https://api.giantrouter.my.id
API Key: <your key from step 1>
Model: pick from the catalog, start with the cheap ones

That base URL is what redirects all Cline requests to the gateway. No project code changes, no per-repo configuration to repeat.

4. Choose your first model deliberately. For small tasks (fix a test, explain a function, localized edits), a flash/economy-class model is enough and much cheaper. For architectural tasks or cross-file refactors, that’s when you pick a big model. Per-million-token prices are openly displayed on the homepage; models can differ by tens of times in price, so the choice is part of your cost control, not just taste.

5. Run one small task. A good first task: “explain what this file X does” or “fix the failing test in file Y”. The first task also tests the full chain: Cline → gateway → model → result.

6. Open the usage report. In the dashboard, look at the requests that just happened: which model was used, input and output tokens, the cost. This is the habit that will save your budget: cost per task is shown, not hidden in an end-of-month bill.

Three small habits that save a lot

  • One key per context. A key for experiments, a key for client work; each with its own budget. The cost reports stay separate per context too.
  • Big models only for tasks that need them. The usual pattern: drafts and small iterations on a cheap model, reviews and design decisions on a big model.
  • Check the report after the first session. From there you can compute your own cost per task; the worked example is in Claude Code cost per task.

If you already use another provider

Migrating from another API provider (any OpenAI-compatible one, or direct Anthropic access) is usually two changes: base URL and key. The request format and prompt structure don’t change. Two things to watch when switching:

  • Model names can differ between catalogs. Check the model names shown in the Giant Router catalog and adjust the one configuration line.
  • Run one small task for comparison. The same task on the old provider and on the gateway; compare the results and the costs from the usage reports. The switch decision becomes a decision based on numbers, not vibes.

And because there is no monthly contract in this flow, “just try it” has no decision cost: one Rp10,000 QRIS and one hour of experimenting is enough to know whether it fits.

If something gets stuck

Most first-setup problems are one of three things, and all three can be verified yourself without asking anyone:

Symptom Most common cause Where to check
Request fails with an auth error Base URL mistyped or key not copied in full Provider configuration in Cline
Request stops mid-task The key’s budget limit has been reached Usage report in the dashboard
Responses feel “way too small-model” The selected model isn’t the one you thought Model name in each request’s report entry

If all three check out and it still misbehaves, run one request through curl/the terminal straight to the gateway endpoint. Separating “a Cline problem” from “a connectivity problem” usually ends the search in one step.

Why “your own key” matters here

Cline running on somebody else’s shared access (a sharing package) has two problems: your usage trail is mixed into one account with strangers, and once that account is blocked by the provider, your work stops mid-flight. With your own key through an official gateway, your usage is isolated; the full explanation is in official API, not shared accounts.

Create your first key, starting at Rp10,000 →

← Back to Guides

Start using your favorite AI models today

One API key for 50+ AI models. Top up with QRIS from Rp10,000 and see the cost of every request.