Use Claude Code without a credit card: pay with QRIS

Top up Cent AI with QRIS, create an API key, then point Claude Code at Cent AI with four environment variables. Full steps and how to check them.

Cent AIPublished 4 min read

Many developers in Indonesia want to use Claude Code but have no credit card, or would rather not store a card with an overseas service. On Cent AI, you top up your balance with QRIS in rupiah, then point Claude Code at Cent AI with a few environment variables. This post walks through the steps, from the first top-up to the first prompt.

Why this works

Claude Code speaks the Anthropic Messages format. Cent AI serves the same format at https://api.cent-ai.dev, and Claude Code appends /v1/messages itself. Claude Code needs no changes; only the destination address and the key change.

Payment is prepaid. You add a USD balance first, and every request is paid from it. No card is stored, nothing renews, and nothing is charged automatically.

Step 1: top up with QRIS

  1. Sign in to the Cent AI dashboard and open Billing.
  2. Pick an amount: a preset of $1, $5, $10, $25 or $50, or any amount from $1.
  3. Cent AI converts the USD amount to rupiah at the live rate, with no exchange spread added. The rate is locked when the order is created and shown before you pay.
  4. Pay on the payment page with any bank or e-wallet app that can pay QRIS.

Cent AI covers the QRIS processing fee, so you pay the amount shown at checkout. An order is valid for 60 minutes. If you pay after that, the payment is still credited at the locked rate.

Besides regular top-ups, Billing also sells one-time budget packages: $1.99, $9.99 and $99. A package's budget equals its price and does not expire while the account is active. Each package size covers a set of models, listed on the pricing page.

Step 2: create an API key

Open the Keys page in the dashboard and create a new key. It looks like cai_<secret> and is shown only once, so copy it and keep it somewhere safe. Cent AI stores only its hash.

Each key can carry a daily or monthly limit, an IP allowlist and a model allowlist. For Claude Code, a daily limit keeps a forgotten session from draining your balance.

Step 3: point Claude Code at Cent AI

Set these four variables in your terminal. Replace YOUR_API_KEY with your key.

export ANTHROPIC_BASE_URL="https://api.cent-ai.dev"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="claude-opus-5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-5.5"

In PowerShell:

$env:ANTHROPIC_BASE_URL = "https://api.cent-ai.dev"
$env:ANTHROPIC_AUTH_TOKEN = "YOUR_API_KEY"
$env:ANTHROPIC_MODEL = "claude-opus-5"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = "claude-haiku-5.5"

Things to watch:

  • ANTHROPIC_BASE_URL is written without /v1.
  • ANTHROPIC_MODEL is the model for the session. Write its name exactly as it appears in the models list.
  • ANTHROPIC_DEFAULT_HAIKU_MODEL is what Claude Code uses for background tasks, such as naming a session. Set it to a Cent AI model name too; otherwise those background requests fail with 404 model_not_found.

Shell variables last for one terminal only. To keep them, put the same values in the env block of your user ~/.claude/settings.json. Do not put the key in the project's .claude/settings.json, because that file is usually committed.

Step 4: check before you start working

Send one small request with curl to make sure the key and base URL are right:

curl https://api.cent-ai.dev/v1/messages \
  -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-5","max_tokens":16,"messages":[{"role":"user","content":"Hello"}]}'

The response includes usage.cost, the amount charged for that request in USD. Then run claude from the same terminal and type /status. The base URL line should show https://api.cent-ai.dev. If it still shows a login to another account, the variables have not reached the session.

What it costs

Every model has four rates per million tokens: input, cache read, cache write and output. Claude Code resends the conversation on every turn, so most tokens can usually be read from the cache. On Cent AI, cache read is 10% of the model's input rate. Cent AI does not promise a cache hit rate, and cache tokens are billed only when the model reports them.

Current rates for every model are on the pricing page. Every Claude Code turn also shows up on the Requests page in the dashboard with tokens per rate and its cost, so you can match the bill line by line.

If you see an error

  • 401 invalid_api_key: the key is wrong, truncated or revoked. Check the value of ANTHROPIC_AUTH_TOKEN.
  • 402 insufficient_balance: the balance for that model is empty, or the model is not in your package. Top up again with QRIS or buy a package that covers the model.
  • 429 rate_limited: more than 600 requests per minute on one key. Claude Code with many subagents can reach this; split the work across several keys.

Requests that fail before the model accepts them are not charged. The full guide, including the VS Code extension settings, is in the Claude Code docs.

Sources

  1. cent-ai.dev/docs/integrations/claude-code (opens in a new tab) · accessed 2026-11-14
  2. cent-ai.dev/docs/concepts/top-up (opens in a new tab) · accessed 2026-11-14
  3. cent-ai.dev/docs/concepts/balance (opens in a new tab) · accessed 2026-11-14
ShareXThreads