Skip to main content
Claude Code connects to Routeway using the Anthropic Messages API. This lets you run Claude Code with your Routeway API key and choose any model that supports function calling (tools).
Requires a valid Routeway API key. Get yours from the dashboard.

Quick Start

1

Install Claude Code

Follow the official installation guide for your platform:
curl -fsSL https://claude.ai/install.sh | bash
2

Point Claude Code to Routeway

Claude Code reads Anthropic-compatible environment variables. Set the base URL to Routeway and provide your API key.
Claude Code does not read .env files by default. Set these variables in your shell profile or use the project settings file method below.
export ANTHROPIC_BASE_URL="https://api.routeway.ai"
export ANTHROPIC_AUTH_TOKEN="YOUR_ROUTEWAY_API_KEY"
export ANTHROPIC_API_KEY="" # Must be explicitly empty to prevent conflicts

# Optional: map Claude Code tiers to specific model IDs
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4.5"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4.5"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4.5"
Keep the project settings file out of version control if it contains a real API key.
You can replace the example model IDs with any model that supports function calling. See the models list.
3

Start Claude Code

In your project directory, run:
claude
Your requests will be routed through Routeway’s Anthropic-compatible endpoint (/v1/messages).
4

Verify

Inside Claude Code, run:
/status
You should see output like:
Auth token: ANTHROPIC_AUTH_TOKEN
Anthropic base URL: https://api.routeway.ai

Example Prompts

Try these once you’re connected:
  • “Summarize this project: key folders, build system, and entry points.”
  • “Find where X is implemented and list the relevant files.”
  • “Run tests and fix the first failing test.”
  • “Refactor: extract helper Y and update all call sites.”