NyxosNyxos API
Integrations

Claude Code (CLI) Integration

Configure Anthropic's official agentic terminal assistant, Claude Code, with Nyxos API.

Claude Code is Anthropic's official terminal-based agent that reads, edits, and debugs code across your repository.

Claude Code speaks the Anthropic-native protocol and appends /v1/messages itself, so it connects to the root host of Nyxos API — never add /v1.


Installation

Requires Node.js 18+ — install the LTS version from nodejs.org, then:

npm install -g @anthropic-ai/claude-code
claude --version

Required Settings

VariableValuePurpose
ANTHROPIC_BASE_URLhttps://api.nyxos.shopRoutes requests through the gateway (no /v1).
ANTHROPIC_AUTH_TOKENsk-YOUR_NYXOS_KEYSent as the Authorization: Bearer credential.

You do not need to set any model variables: when you run Claude models, Claude Code's built-in model aliases resolve automatically against the gateway. Only set ANTHROPIC_MODEL explicitly if you want to pin a specific non-default model ID.


Edit your user settings file:

  • Windows: %USERPROFILE%\.claude\settings.json
  • macOS / Linux: ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.nyxos.shop",
    "ANTHROPIC_AUTH_TOKEN": "sk-YOUR_NYXOS_KEY"
  }
}

Restart Claude Code after editing.

Option B: Shell Environment Variables

Linux / macOS (~/.bashrc, ~/.zshrc):

export ANTHROPIC_BASE_URL="https://api.nyxos.shop"
export ANTHROPIC_AUTH_TOKEN="sk-YOUR_NYXOS_KEY"

Windows PowerShell (persistent, user scope):

[System.Environment]::SetEnvironmentVariable('ANTHROPIC_BASE_URL', 'https://api.nyxos.shop', 'User')
[System.Environment]::SetEnvironmentVariable('ANTHROPIC_AUTH_TOKEN', 'sk-YOUR_NYXOS_KEY', 'User')

Launch and Verify

claude

Inside Claude Code, run /status and confirm:

  • A line Anthropic base URL: https://api.nyxos.shop appears — without it, Claude Code is not pointed at the gateway.
  • The credential line reads Auth token (ANTHROPIC_AUTH_TOKEN) — if it shows a claude.ai Login method instead, your variable is not being picked up: set ANTHROPIC_AUTH_TOKEN somewhere Claude Code reads before first-run setup (a shell export or the env block in the user settings.json).

Notes

  • Your key must belong to a group that includes the model — the automatic Auto-A group covers the catalog (see Groups & Multipliers).
  • Claude models on the gateway support prompt caching and extended thinking; check features per model on /pricing.
  • Want to pin a specific Claude ID (e.g. an older or experimental one from /pricing)? Set it explicitly with ANTHROPIC_MODEL in the same env block.

On this page