
Free stealth model on OpenRouter, working in Claude Code CLI or opencode in about 3 minutes.
npm install -g @anthropic-ai/claude-codeor, without Node (macOS/Linux), see the install docs:
curl -fsSL https://claude.ai/install.sh | bashOpen openrouter.ai/settings/keys. If you are not signed in you land here. Continue with GitHub is one click, no password to set.
Back on the keys page: Create Key → name it → copy the sk-or-v1-… value. It is shown only once.
Ox Alpha is free during preview, so no credits are required. Check the price any time on the model page:
stealth/ox-alpha, price Free, context 1M.Run these in your terminal. Replace the key in line 2 with your own. They only affect this terminal window. Other windows keep using your normal Claude account.
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"export ANTHROPIC_AUTH_TOKEN="sk-or-v1-YOUR-KEY-HERE"export ANTHROPIC_API_KEY=""export ANTHROPIC_MODEL="stealth/ox-alpha"export ANTHROPIC_SMALL_FAST_MODEL="stealth/ox-alpha"/api, not /api/v1. Claude Code appends /v1/messages itself.ANTHROPIC_API_KEY stops a real Anthropic key from taking priority.export lines in ~/.zshrc directly. They apply to every shell, so every claude session would go to OpenRouter and your Anthropic subscription would sit unused. Use a separate command instead.
Store the key in a file only you can read (paste your own key in):
mkdir -p ~/.config/openrouter && printf '%s' 'sk-or-v1-YOUR-KEY-HERE' > ~/.config/openrouter/key && chmod 600 ~/.config/openrouter/keyAdd an oxclaude command that sets the variables for that one run only:
cat >> ~/.zshrc <<'EOF'
# Ox Alpha (OpenRouter): only inside `oxclaude`; plain `claude` stays on Anthropic
oxclaude() {
local key="${OPENROUTER_API_KEY:-$(cat ~/.config/openrouter/key 2>/dev/null)}"
if [[ -z "$key" ]]; then
echo "No OpenRouter key: put it in ~/.config/openrouter/key or export OPENROUTER_API_KEY" >&2
return 1
fi
ANTHROPIC_BASE_URL="https://openrouter.ai/api" \
ANTHROPIC_AUTH_TOKEN="$key" \
ANTHROPIC_API_KEY= \
ANTHROPIC_MODEL="stealth/ox-alpha" \
ANTHROPIC_SMALL_FAST_MODEL="stealth/ox-alpha" \
ANTHROPIC_CUSTOM_MODEL_OPTION="stealth/ox-alpha" \
ANTHROPIC_CUSTOM_MODEL_OPTION_NAME="Ox Alpha" \
ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION="OpenRouter stealth · free · 1M context" \
command claude "$@"
}
EOFsource ~/.zshrcclaude → your normal Anthropic account, untouched.oxclaude → same CLI, same project, running on Ox Alpha.ANTHROPIC_CUSTOM_MODEL_OPTION* lines are what put Ox Alpha in the /model list inside that session.On bash, append the same function to ~/.bashrc.
cd your-projectclaudeStarted via oxclaude? Use that instead of claude. Type /status inside the session. The API base and model should read OpenRouter / Ox Alpha, and /model lists Ox Alpha as a pickable entry.
$ claude ✻ Welcome to Claude Code > /status Account API base https://openrouter.ai/api Auth ANTHROPIC_AUTH_TOKEN (sk-or-v1-…) Model Main stealth/ox-alpha Small/fast stealth/ox-alpha > explain what this repo does ⏺ Reading files…
/status looks like when traffic goes to OpenRouter.Live token usage: openrouter.ai/activity
| Symptom | Fix |
|---|---|
401 Unauthorized | Key wrong, or ANTHROPIC_API_KEY not blanked. Check with echo $ANTHROPIC_AUTH_TOKEN. |
404 not found | Base URL has a trailing /v1. Use https://openrouter.ai/api. |
| Still hitting Anthropic | Stale vars in another terminal tab, or a settings.json override. Open a fresh terminal. |
model not found | ID must be exactly stealth/ox-alpha. Stealth models get renamed. Check the model page. |
curl -fsSL https://opencode.ai/install | bashor with npm:
npm install -g opencode-ai@latestor with Homebrew:
brew install sst/tap/opencodeGo to openrouter.ai/settings/keys and sign in. Continue with GitHub works without a password.
Then Create Key and copy the sk-or-v1-… value. Ox Alpha is $0 during preview, no credits needed:
stealth/ox-alpha, price Free, context 1M.opencode auth loginChoose OpenRouter, paste the key, press Enter.
$ opencode auth login ┌ Add credential │ ◆ Select provider │ ○ Anthropic │ ● OpenRouter │ ○ OpenAI │ ○ Google │ ◆ Enter your API key │ sk-or-v1-•••••••••••••••••••••••• └ ✓ OpenRouter credentials saved
~/.local/share/opencode/auth.json.or skip the prompt with an environment variable:
export OPENROUTER_API_KEY="sk-or-v1-YOUR-KEY-HERE"Stealth models are new, so declare it once. This single command writes the global config at ~/.config/opencode/opencode.json:
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json <<'EOF'
{
"$schema": "https://opencode.ai/config.json",
"model": "openrouter/stealth/ox-alpha",
"provider": {
"openrouter": {
"models": {
"stealth/ox-alpha": {
"name": "Ox Alpha (stealth)",
"limit": { "context": 1000000, "output": 64000 },
"tool_call": true
}
}
}
}
}
EOFWant it for one repo only? Put the same JSON in opencode.json at the repo root. It overrides the global file. All options: opencode.ai/docs/config
cd your-projectopencodeType /models, pick Ox Alpha (stealth). The active model shows in the status bar.
opencode ~/projects/demo /models ┌──────────────────────────────────────────┐ │ ▸ OpenRouter │ │ ● Ox Alpha (stealth) free · 1M ctx │ │ ○ Claude Opus 4.5 │ │ ○ Gemini 3 Pro │ └──────────────────────────────────────────┘ > add tests for src/parser.ts ⏺ reading src/parser.ts … ────────────────────────────────────────────── build openrouter/stealth/ox-alpha
/models → OpenRouter → Ox Alpha; status bar confirms it.or run one shot from the shell, no TUI:
opencode run -m openrouter/stealth/ox-alpha "summarize this repo"| Symptom | Fix |
|---|---|
Model not in /models | Config JSON invalid or in the wrong path. Run opencode --print-logs and look for a parse error. |
401 / auth error | Re-run opencode auth login, or check echo $OPENROUTER_API_KEY. |
| Tools never fire | Keep "tool_call": true in the model block. |
command not found | The installer puts the binary in ~/.opencode/bin. Add it to PATH. |