Tutorial · Claude Code
Connect Claude Code by setting the base URL
Point ANTHROPIC_BASE_URL at LowCostAI and add a token to use Claude Sonnet / Opus — with no project code changes.
Connect in three steps
You only change two environment variables — no need to rewrite call logic.
Step 1
Create an API keyCreate a key for a team or project and set its quota.
Step 2
Set base URL and tokenExport the env vars so Claude Code sends requests to LowCostAI.
Step 3
Run and check usageUse claude normally; consumption is logged per key and model.
Configuration
macOS / Linux:
# Point to the LowCostAI endpoint export ANTHROPIC_BASE_URL="https://api.lowcostaiapi.com" export ANTHROPIC_AUTH_TOKEN="YOUR_TOKEN" claude "review this pull request"
Windows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://api.lowcostaiapi.com" $env:ANTHROPIC_AUTH_TOKEN = "YOUR_TOKEN" claude "explain this codebase"
Replace YOUR_TOKEN with your key; the base URL is shown in the dashboard.