Claude Code with FrogDino: use a custom API base URL
Claude Code connects to a third-party gateway through two environment variables: ANTHROPIC_BASE_URL for the address and ANTHROPIC_AUTH_TOKEN for the credential. The steps below follow the official Claude Code gateway guide, with FrogDino's address and key.
Before you start: sign up and create a key
- Open the sign-up page and register with your email.
- Sign in and top up under Recharge. You pay for what you use; there is no monthly fee. Payment is by Alipay or WeChat Pay.
- Go to API Keys, click Create key and choose the Claude group. The full key is shown once, so save it right away.
After creating a key, click "Use key" in the console. It generates a complete config with your key filled in. This page explains the same settings.
Step 1: set the two variables in your shell
The official guide recommends starting with shell exports and moving to a settings file after verifying.
Bash / Zsh:
export ANTHROPIC_BASE_URL=https://frogdino.com
export ANTHROPIC_AUTH_TOKEN=your-key
PowerShell:
$env:ANTHROPIC_BASE_URL = "https://frogdino.com"
$env:ANTHROPIC_AUTH_TOKEN = "your-key"
Shell exports apply only to that terminal session and programs started from it.
Step 2: verify the connection
From the same shell, send a minimal request straight to the gateway:
curl -sS -w '\n%{http_code}\n' -X POST "$ANTHROPIC_BASE_URL/v1/messages" \
-H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model": "claude-sonnet-5-5", "max_tokens": 1, "messages": [{"role": "user", "content": "."}]}'
A JSON response starting with {"id":"msg_ and containing a "content" field means the gateway is reachable and the key works. A 401 means the key was rejected.
Step 3: confirm in Claude Code
Start claude from the same shell, send a message, then run /status. The Status tab should show:
- an
Anthropic base URLline withhttps://frogdino.com. If the line is missing, the variable did not reach the session; - an
Auth tokenline namingANTHROPIC_AUTH_TOKEN. ALogin methodline naming a claude.ai account means the credential is not active.
Step 4: persist in settings.json
Put the variables in the env block of a settings file so every Claude Code session picks them up:
{
"env": {
"ANTHROPIC_BASE_URL": "https://frogdino.com",
"ANTHROPIC_AUTH_TOKEN": "your-key"
}
}
~/.claude/settings.jsonapplies to all your projects. On Windows:%USERPROFILE%\.claude\settings.json..claude/settings.local.jsonapplies to one project.
Do not put the key in a project's .claude/settings.json. That file is committed and shared with everyone who clones the repository.
FAQ
Should ANTHROPIC_BASE_URL end with /v1?
No. Set it to https://frogdino.com; Claude Code requests /v1/messages under that address.
ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY?
Use ANTHROPIC_AUTH_TOKEN. Per the Claude Code docs its value is sent as "Authorization: Bearer ...", while ANTHROPIC_API_KEY is sent as X-Api-Key. FrogDino keys are used as bearer tokens.
A startup warning names two credential sources and ends in "auth may not work as expected".
A gateway credential and a saved claude.ai login are both active. Per the official troubleshooting table: run /logout to use the gateway credential, or unset the variables to use the saved login.
I get 401.
The credential was rejected. Check that the key is complete, that it belongs to the Claude group and that your balance is above zero.
Does this still consume my Claude subscription limits?
No. Per the official docs, while a gateway credential is active requests carry that credential instead of your claude.ai subscription login, and the subscription usage limits do not apply to them. Usage is billed to the account that owns the key.
I set the variables in both my shell and settings.json. Which wins?
The settings-file value. Run /status to see which base URL and credential source Claude Code is using.
Official documentation
Sign up and create a keyModels & pricing
Got an error? Look it up in the error code reference.