Integration guides

Claude Code

Anthropic's command-line coding assistant, speaking the native Anthropic protocol; point it at XylemNode to call it with the same key.

Site / download
  1. 01

    Install and verify

    The official recommendation is the native install script, no Node required; the npm route still works but is no longer recommended. After installing, print the version to confirm.

    # macOS / Linux / WSL (recommended)
    curl -fsSL https://claude.ai/install.sh | bash
    
    # Windows PowerShell (recommended)
    irm https://claude.ai/install.ps1 | iex
    
    # npm route (still works, no longer recommended)
    npm install -g @anthropic-ai/claude-code
    
    # Verify
    claude --version
  2. 02

    Find the config file

    Claude Code reads its config from settings.json. Put it in the user-level file to reuse across all projects, or place one in a project root to apply only there (project-level takes precedence over user-level).

    Windows
    %USERPROFILE%\.claude\settings.json
    macOS
    ~/.claude/settings.json
    Linux
    ~/.claude/settings.json
    Project-level
    <project-root>/.claude/settings.json
  3. 03

    Write the config

    In the env block of settings.json, set three fields: endpoint, auth token and default model. The address uses the native protocol — no /v1 needed, Claude Code fills in the request path itself.

    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://api.xylemnode.com",
        "ANTHROPIC_AUTH_TOKEN": "sk-your-key",
        "ANTHROPIC_MODEL": "gpt-5.6-sol"
      }
    }
  4. 04

    Or use system env vars

    If you'd rather not edit a file, set the same three as system environment variables — same effect. On Windows, run setx and reopen the terminal.

    # Windows (PowerShell / CMD)
    setx ANTHROPIC_BASE_URL "https://api.xylemnode.com"
    setx ANTHROPIC_AUTH_TOKEN "sk-your-key"
    setx ANTHROPIC_MODEL "gpt-5.6-sol"
    
    # macOS / Linux
    export ANTHROPIC_BASE_URL="https://api.xylemnode.com"
    export ANTHROPIC_AUTH_TOKEN="sk-your-key"
    export ANTHROPIC_MODEL="gpt-5.6-sol"
  5. 05

    Clear the onboarding gate before the first run

    A fresh Claude Code install reads .claude.json in your user directory and checks its onboarding flag before anything else. With that flag missing it ignores the custom endpoint you just configured and dials api.anthropic.com directly, so the very first run fails with Unable to connect to Anthropic services and Failed to connect to api.anthropic.com (403 or ERR_BAD_REQUEST) even though the address and the key are both correct. Adding the flag by hand clears the gate: create the file as shown if it doesn't exist, or merge that one line into the top-level object and leave the rest untouched, then run claude again. Note that .claude.json is not the settings.json from the earlier step — it sits alongside the .claude directory, and global state like this is silently ignored when written into settings.json.

    Windows
    %USERPROFILE%\.claude.json
    macOS / Linux
    ~/.claude.json
    {
      "hasCompletedOnboarding": true
    }
  6. 06

    Launch and test

    From your project directory run claude and send a simple message to confirm; use /status to see the current endpoint and model.

    claude
    
    # Non-interactive quick check
    claude -p "Reply with OK only"

Three quick tips

First, when connecting a third-party service, ANTHROPIC_AUTH_TOKEN (a Bearer token) is the most reliable auth; once set you don't need Anthropic's official login — if an old session conflicts, run /logout and restart. Second, Claude Code uses a lighter model for small background tasks; to route those through XylemNode too, add ANTHROPIC_DEFAULT_HAIKU_MODEL pointing at the same model. The older ANTHROPIC_SMALL_FAST_MODEL is deprecated, so prefer the former in new configs. Third, the onboarding flag occasionally disappears on its own: if Claude Code decides .claude.json is corrupted while exiting, it overwrites the file with a near-empty skeleton and the flag goes along with your history, so the same connection error comes back. Re-add it as in the step above.

Common questions

Claude Code fails on the first run with Unable to connect to Anthropic services

You didn't misconfigure anything. On startup a fresh Claude Code install checks the onboarding flag in .claude.json in your user directory; with the flag missing it skips your custom endpoint and goes straight to api.anthropic.com, which fails to connect (commonly 403 or ERR_BAD_REQUEST). Add "hasCompletedOnboarding": true at the top level of .claude.json, save, and start it again — the step above walks through it.