Sembang AIModelHargaDokumentasiPanduan

How to use Claude Code and pay in Rupiah

Install Claude Code, then set three environment variables: ANTHROPIC_BASE_URL=https://api.macloudai.com, ANTHROPIC_AUTH_TOKEN with your MaCloud AI API key, and ANTHROPIC_MODEL with a model name. Then run claude as usual; usage is deducted from the Rupiah balance you top up by QRIS or bank transfer.

Updated · MaCloud AI

What you need

  • Claude Code installed on your computer (follow Anthropic's official install guide).
  • A MaCloud AI account with balance. Sign up, then top up from Rp 50,000 by QRIS or bank transfer.
  • An API key from API Key in the console.

Setup on macOS and Linux

Run this in a terminal, then start Claude Code:

export ANTHROPIC_BASE_URL=https://api.macloudai.com
export ANTHROPIC_AUTH_TOKEN=sk-...
export ANTHROPIC_MODEL=hk-5-5
claude

To keep the settings, add the three export lines to ~/.zshrc (macOS) or ~/.bashrc (Linux) and open a new terminal.

Setup on Windows (PowerShell)

For the current PowerShell session:

$env:ANTHROPIC_BASE_URL="https://api.macloudai.com"
$env:ANTHROPIC_AUTH_TOKEN="sk-..."
$env:ANTHROPIC_MODEL="hk-5-5"
claude

To make them permanent, use setx for all three (for example setx ANTHROPIC_BASE_URL "https://api.macloudai.com"), then close and reopen PowerShell.

Check that it works

  1. Run claude in a project folder and send a short message such as "hello".
  2. If it replies, open the console → Usage: the call appears with its token count and cost.
  3. Error 401 means the API key is wrong or deleted. 403 means the balance ran out or the key may not use that model. 404 means the model name is wrong: copy it exactly from the models page.

Keeping costs down

Claude Code sends a lot of context at every step: file contents, command output and the conversation so far. All of it counts as input tokens, so long sessions cost more per step.

  • Start a fresh conversation with /clear when you switch tasks, so old history is not sent again.
  • Use a lighter model for simple work (tidying code, writing comments) and a large model for hard tasks.
  • Watch daily usage in the console. The cost guide shows how to estimate it.

Frequently asked questions

Q1Do I need a Claude Pro or Max subscription?
No. Set up this way, Claude Code uses your MaCloud AI API key and balance and is paid per token. There is no monthly fee.
Q2Why does the Claude Code base URL have no /v1?
Claude Code uses the Anthropic format, whose base URL is https://api.macloudai.com without /v1. The /v1 address is for tools that use the OpenAI format.
Q3Why do I get error 401 or 403?
401 means the API key is wrong, disabled or deleted. 403 means the balance is too low or the key may not use the chosen model. Top up or change the model and try again.
Q4How much does Claude Code cost per day?
It depends on the tokens used: project size, session length and model. Check the real figures under Usage in the console after a few working days.

More guides