Diagnostic Commands
Run diagnostic check
bash
claude /doctorCheck environment variables
bash
# macOS/Linux
echo $ANTHROPIC_BASE_URL
echo $ANTHROPIC_AUTH_TOKEN
# Windows PowerShell
echo $env:ANTHROPIC_BASE_URL
echo $env:ANTHROPIC_AUTH_TOKENCommon Errors and Solutions
Error: API key is invalid
- Key entered incorrectly, check for extra spaces
- Key has expired or been reset
- Wrong environment variable name (should be ANTHROPIC_AUTH_TOKEN)
Error: Connection refused / Network error
- ANTHROPIC_BASE_URL is set incorrectly
- Network firewall is blocking the connection
- Local proxy or firewall settings conflict with the API request
Error: Insufficient quota
Insufficient quota. Log in to the console to check your quota and top up if needed.
Error: Command not found: claude
Re-run the installation command, or reopen the terminal window.
Get More Help
Contact Support
If none of the above solutions work, please contact support.
View Official Documentation
The Claude Code official documentation contains more advanced usage. Anthropic Docs