Skip to main content
Claude Code is Anthropic’s official agentic coding tool that lives in your terminal. Connect it to ClearMaas to access the full Claude model family plus any other provider through the OpenAI-compatible path.

Prerequisites

  • Claude Code installed (npm install -g @anthropic-ai/claude-code or via installer)
  • A ClearMaas API key starting with sk-

Setup

Set two environment variables before launching Claude Code:
The Anthropic SDK that Claude Code uses appends /v1/messages itself, so the base URL must be the bare host �?no /v1 suffix.

Persistent configuration

Rather than exporting env vars each time, add them to your shell profile:
Or configure them in Claude Code’s settings.json under the env key:
Settings file locations (in order of precedence):
  • .claude/settings.json �?project-scoped
  • ~/.claude/settings.json �?user-scoped

Choosing a model

By default Claude Code uses claude-sonnet-4-7-latest. Override the model in settings.json:
Any model with the anthropic/ prefix routes through ClearMaas’s Anthropic-compatible path. To use models from other providers (GPT, Grok, DeepSeek, etc.), Claude Code can route them via ClearMaas’s translation layer.

Model routing via ClearMaas

ClearMaas translates OpenAI-style requests to upstream providers. To use a non-Anthropic model with Claude Code:
ClearMaas handles the protocol translation so Claude Code (which natively speaks Anthropic) can call any supported provider. When ANTHROPIC_BASE_URL points to a non-Anthropic host, Claude Code disables MCP tool search by default. If your proxy forwards tool_reference blocks correctly, re-enable it:

Verification

Run a quick test after setup:
Claude Code should confirm it’s connected through ClearMaas. Check your ClearMaas dashboard to see the request logged.

Troubleshooting

See also