orientxorientx

Claude Code

Anthropic's CLI against the Messages API

Claude Code speaks the Anthropic Messages API (POST /v1/messages), not Chat Completions. Point ANTHROPIC_BASE_URL at the orientx host — do not append /v1; the CLI adds that path itself. Anthropic's LLM gateway docs cover the same variables.

Base URLhttps://api.orientx.ai
AuthANTHROPIC_AUTH_TOKEN (Bearer)
Config~/.claude/settings.json
Official docsConnect to an LLM gateway

Install

curl -fsSL https://claude.ai/install.sh | bash

Confirm with claude --version.

Point it at orientx

Write ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "sk-...",
    "ANTHROPIC_BASE_URL": "https://api.orientx.ai",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}

Or export the same variables in the current shell. ANTHROPIC_API_KEY (x-api-key) also works; prefer one of the two, not both.

Run Claude Code

claude

Pick a model with /model. The id must match GET /v1/models exactly.

The model must accept /v1/messages (including tools). Chat Completions-only ids will fail once the agent starts calling tools. If you previously logged in to Anthropic, override ANTHROPIC_AUTH_TOKEN so the CLI does not keep using the official account.

On this page