Claude Code
Scan Claude Code's requests by setting ANTHROPIC_BASE_URL to your Tawa Guard proxy URL and using an Anthropic API key.
Claude Code reads ANTHROPIC_BASE_URL at startup and appends the Messages path
itself, so the value is the bare Anthropic URL.
export ANTHROPIC_BASE_URL="https://proxy.tawaguard.com/<token>/anthropic"
export ANTHROPIC_API_KEY="<your Anthropic key>"
claudeReplace <token> with your proxy token. Keep the full
URL in an environment variable or a secrets manager, because it carries the
token. See Proxy tokens.
What to know
- Use an Anthropic API key. Signing in to Claude Code with a Claude subscription was not checked against the proxy.
- The Anthropic provider must be on the app's allowed providers. It is by default.
- Start in Monitoring. Check one request before you switch the app to Blocking.
This setup was not run end to end against the hosted proxy. The variable name and URL shape come from the proxy's code and earlier tests of the same request path.
Overview
Set the provider base URL for Claude Code, Codex, the OpenAI and Anthropic SDKs, or any tool that accepts a custom base URL, and scan its traffic.
Codex
Scan Codex requests by pointing OPENAI_BASE_URL, or a custom model provider in config.toml, at your Tawa Guard proxy URL with an OpenAI API key.