Skip to content

Install Claude Code ​

Three steps. Two minutes. No fork, no wrapper — you'll be running Anthropic's official claude binary, just routed through the gateway.

1. Get an API key ​

Sign up at luckyapi.chat. Top up with $5 to start. The dashboard issues you a key that looks like sk-....

2. Install the official CLI ​

bash
npm install -g @anthropic-ai/claude-code
powershell
npm install -g @anthropic-ai/claude-code

If you don't have Node.js, install it first via nodejs.org or your package manager (brew install node, winget install OpenJS.NodeJS.LTS).

3. Point it at the gateway ​

Set two environment variables. Persist them in your shell rc so future sessions inherit them.

bash
export ANTHROPIC_BASE_URL="https://luckyapi.chat"
export ANTHROPIC_AUTH_TOKEN="sk-..."         # your key from step 1
export ANTHROPIC_API_KEY=""                  # ensure the official var is empty
powershell
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL",   "https://luckyapi.chat", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-...",                "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY",    "",                      "User")

Run it ​

claude

That's it. The first prompt opens an editor session against your repo. Switch permission modes with Shift+Tab. Check usage in real time with /cost.

Verify it's actually using the gateway ​

bash
claude --version       # any version works
echo $ANTHROPIC_BASE_URL
# → https://luckyapi.chat

Run a tiny prompt, then check the luckyapi.chat dashboard — you should see the request show up in the usage feed within a few seconds.

Next ​

Independent. Not affiliated with Anthropic or OpenAI.