Updated 2026-11-19 · The /v1/messages endpoint is tested in our release checks; the Claude Code client is not yet tested
What is checked and what is not yet tested
| Item | Status |
|---|---|
POST /v1/messages: msg_ ids, type: message, standard stream events | Tested (compatibility check after every release) |
Auth: Authorization: Bearer or x-api-key | Checked |
| Claude is only open to Full group keys | Checked (see two key groups) |
| A full Claude Code session, background model, tool use | Not yet tested |
Five steps
- 1
Create a Full group key
After you sign up and add credits, create a Full group key on the keys page. The default Text group key cannot call Claude.
- 2
Check /v1/messages with curl
Call https://apirove.com/v1/messages with the key. Set up Claude Code once the reply has type message.
- 3
Set the environment variables
Set ANTHROPIC_BASE_URL to https://apirove.com (no /v1), ANTHROPIC_AUTH_TOKEN to the key and ANTHROPIC_MODEL to a model ID.
- 4
Start Claude Code
Run claude in the same terminal and send one message.
- 5
Check the usage page
Confirm a Claude row with a charge appears on the usage page in the console.
Step 2: check /v1/messages with curl
Replace YOUR_API_KEY with a Full group key. A reply with "type": "message" means the key, group and model all work.
export APIROVE_API_KEY='YOUR_API_KEY'
curl https://apirove.com/v1/messages \
-H "x-api-key: $APIROVE_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model": "claude-sonnet-5", "max_tokens": 64, "messages": [{"role": "user", "content": "Hello!"}]}'Model IDs follow the model directory; this page uses claude-sonnet-5 as the example.
Step 3: set the environment variables (Claude Code part not yet tested)
The base URL is the domain only, with no /v1:
https://apirove.com
macOS / Linux (bash, zsh):
export ANTHROPIC_BASE_URL="https://apirove.com" export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY" export ANTHROPIC_MODEL="claude-sonnet-5" export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-sonnet-5" claude
Windows PowerShell:
$env:ANTHROPIC_BASE_URL="https://apirove.com" $env:ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY" $env:ANTHROPIC_MODEL="claude-sonnet-5" $env:ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-sonnet-5" claude
ANTHROPIC_AUTH_TOKENsends the key as a Bearer token.ANTHROPIC_API_KEY(sent asx-api-key) also works; use one of them.ANTHROPIC_MODELis the main model.ANTHROPIC_DEFAULT_HAIKU_MODELis the model Claude Code uses for small background tasks. Set it to a model your key can call so it does not request one your account lacks (not yet tested; older Claude Code versions useANTHROPIC_SMALL_FAST_MODEL).
/logout inside Claude Code, then start it again with the variables above.Settings file (optional)
To avoid setting variables each time, put them in ~/.claude/settings.json. The file holds your key, so keep it out of Git.
{
"env": {
"ANTHROPIC_BASE_URL": "https://apirove.com",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-5"
}
}Errors
| What you see | Usual cause | Fix |
|---|---|---|
| 401 | Typo, deleted key, or Claude Code used an old login | Copy the key again from the keys page; check with curl; run /logout if needed |
| 403 / model unavailable | A Text group key | Create a Full group key; the URL stays the same |
| 404 | ANTHROPIC_BASE_URL ends in /v1, or a misspelled model ID | Use https://apirove.com; match the model directory |
| Insufficient balance | Prepaid balance is 0 | Add credits or redeem a code, then retry |
| 429 | Too many requests or over a limit | Wait and retry; do not retry in a tight loop |
Billing
Every Claude Code request is billed by actual tokens from your prepaid balance; there is no subscription. Input, output, cache read and cache write each have a rate on the pricing page. The rules are in credits and billing, and each charge is on the usage page.
FAQ
Should ANTHROPIC_BASE_URL include /v1?
No. Use https://apirove.com. Claude Code appends /v1/messages itself; https://apirove.com/v1 becomes /v1/v1/messages and usually returns 404.
Why can't a Text group key call Claude?
Claude is only open to the Full group. Create a Full group key on the keys page; the base URL stays the same and old keys can stay.
ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY?
APIrove accepts both: the first sends Authorization: Bearer, the second sends x-api-key. This page uses ANTHROPIC_AUTH_TOKEN. Set only one so the values cannot disagree.
Has Claude Code itself been tested?
Not yet tested. What we check is the /v1/messages endpoint: after every release a compatibility check tests it against the Anthropic Messages format (msg_ ids, standard stream events). Claude Code's own behavior is whatever you see on your machine; send errors and timestamps to help@apirove.com.
Why does Claude Code use more tokens than chat?
Each turn carries project context and tool results, so input tokens are usually higher than in plain chat. Actual tokens are deducted from your prepaid balance; rates, including cache reads and writes, are on the pricing page and every charge is on the usage page.
Start in three steps
Sign up, add credits, then create a key. Every step is in the console.
Related: Cursor guide · Credits and billing · API key security · Models · Pricing