API Keys
Your keys
How to use
Choose your client. SpareAPI is OpenAI- and Anthropic-compatible, so almost anything that speaks those APIs works.
Set the base URL and your API key as environment variables, then run Claude Code as usual.
1
Step 1
Export environment variables
export ANTHROPIC_BASE_URL="https://api.spareapi.ai"
export ANTHROPIC_AUTH_TOKEN="sk_spare_YOUR_KEY_HERE"2
Step 2
Run Claude Code
claude "refactor this function"