Prerequisites
- Claude Code CLI installed
- Active Orq.ai account
- Orq.ai API key
Setup
Set the following environment variables before launching Claude Code. Once set, every model call Claude Code makes is routed through the Orq.ai AI Gateway for the duration of that session.Claude Code requests routed through the AI Gateway appear in Traces.
Troubleshooting
400 invalid model format
400 invalid model format
The
ANTHROPIC_MODEL value is missing the provider prefix. Use the provider/model_id format (e.g. anthropic/claude-sonnet-4-5, not claude-sonnet-4-5).Claude Code calls Anthropic directly instead of Orq.ai
Claude Code calls Anthropic directly instead of Orq.ai
ANTHROPIC_API_KEY must be set to an empty string. When it holds a value, Claude Code uses the Anthropic API directly and requests bypass the AI Gateway.Requests not appearing in Orq.ai Traces
Requests not appearing in Orq.ai Traces
Verify
ANTHROPIC_BASE_URL is set to https://api.orq.ai/v3/anthropic. Requests sent to Anthropic’s own endpoint bypass the AI Gateway and produce no Traces.Verification
Start a Claude Code session and send a prompt. The response appears in the terminal and the trace appears in Orq.ai Traces with the model identifieranthropic/claude-sonnet-4-5 (or whichever model ANTHROPIC_MODEL is set to).