Base URL
Set ANTHROPIC_BASE_URL to the gateway origin plus /v1.
Route Claude Code and Anthropic Messages-style clients through one self-hosted gateway with provider fallback, telemetry, request logs, config publishing, and rollback.
If this fits your Claude Code routing workflow, star the repository after evaluation so other operators can find it.
Claude Code entry point
AI Model Gateway keeps upstream provider keys in local gateway config. Claude Code-style clients use a gateway client key and send traffic to the data-plane listener.
Set ANTHROPIC_BASE_URL to the gateway origin plus /v1.
Use a gateway client key through ANTHROPIC_AUTH_TOKEN instead of copying provider keys into tools.
Send Anthropic Messages-style requests through POST /v1/messages.
Keep fallback, telemetry, request logs, provider health, and rollback in one self-hosted runtime.
Local setup
For a default local runtime, use the gateway origin plus /v1. Start with one non-production request, then inspect logs, telemetry, and provider health before routing real work.
export ANTHROPIC_BASE_URL="http://127.0.0.1:18080/v1"
export ANTHROPIC_AUTH_TOKEN="$GATEWAY_API_KEY"
Open client integration details
Scope
The gateway supports Anthropic Messages-shaped traffic and bridge paths for selected OpenAI-compatible upstreams. It does not claim full coverage of every Anthropic product API, model feature, tool behavior, or streaming variant.
Config workflow
The CLI can print client snippets or apply supported config updates for local tools. Use dry-run mode first and keep backups enabled unless another system already owns those files.
aigw clients apply -dry-run before changing local files.
Review evidence
Try the packaged v1.4.4 runtime with checksum verification, local config, runtime directories, and supervised startup commands.
Open release install pathReview CI gates, local reproduction commands, runtime smoke checks, feature proof points, and current capability boundaries.
Open quality evidenceInspect admin auth, same-origin browser writes, provider-key handling, SSRF defenses, telemetry sensitivity, and update trust.
Open security modelNext step
Use a local gateway and non-production request first. If the project fits your self-hosted coding-agent routing workflow, starring the repository helps similar teams find it.