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
- Run
claudein a project folder and send a short message such as "hello". - If it replies, open the console → Usage: the call appears with its token count and cost.
- 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
/clearwhen 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.