Skip to content

Troubleshooting

Diagnostic Commands

Run Diagnostic Check

bash
claude /doctor

Check Environment Variables

bash
# macOS / Linux
echo $ANTHROPIC_BASE_URL
echo $ANTHROPIC_AUTH_TOKEN

# Windows PowerShell
echo $env:ANTHROPIC_BASE_URL
echo $env:ANTHROPIC_AUTH_TOKEN

Common Errors and Solutions

Error MessagePossible CauseSolution
API key is invalid① Key entered incorrectly (extra spaces)
② Key expired or reset
③ Wrong environment variable name
Check for extra spaces in the key; confirm the key is valid; ensure the variable name is ANTHROPIC_AUTH_TOKEN
Connection refused / Network errorANTHROPIC_BASE_URL set incorrectly
② Firewall blocking connection
③ Proxy settings conflict
Check BASE_URL config; review firewall rules; check proxy settings
Insufficient quotaQuota depletedLog in to the admin dashboard to check quota and top up
Command not found: claudeCommand not foundRe-run the installation command, or reopen the terminal
Model not foundIncorrect model nameCheck the model name and ensure it's enabled in the dashboard

API Connection Test

Test API connection with curl:

bash
curl https://anyapi.pro/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

If a model list is returned, the connection is working.

Get More Help

  • Official Documentation: Claude Code official docs include more advanced usage → Anthropic Docs
  • Contact Administrator: If the above methods don't resolve your issue, contact the administrator

API PLAT