Quantify where your LLM/agent token spend is going — and reduce it — without losing the oversight your policy already gives you.
Redundant context, unbounded retries, unoptimized prompt chains, no caching: a real cost-reduction report on your Claude Code sessions, plus an optional opt-in to route your policy-governed traffic through the cheapest sufficient model too.
The gateway proxies Claude Code's actual session traffic — system prompt, conversation history, tool definitions — and captures real per-request token/cost telemetry.
When your org's privacy guard is configured, it inspects raw content before any model call — including the gateway's own optimization sub-calls, not just the final forwarded request.
APR's own policy checks can opt into routing through the cheapest model that's still safe for the risk tolerance in play — never downgraded below a safe floor for low-risk-tolerance or health policies.
Every dollar figure traces back to real per-token pricing and real token counts — savings are naive cost minus actual cost, never a hardcoded percentage.
Customers who already enforce policy with APR can get token optimization on the exact same call, in the same response — no separate integration for the two capabilities.
The gateway forwards using your organization's own Anthropic API key — GuardEntry doesn't eat inference cost, it earns on the audit and optimization value.
The primary path is routing Claude Code itself through the gateway. If you already use the Agent Policy Router, you can also opt its own checks into the same optimization.
1. Point Claude Code at the gateway (VS Code extension)
{
"claudeCode.environmentVariables": [
{ "name": "ANTHROPIC_BASE_URL", "value": "https://app.guardentry.ai/api/gateway" },
{ "name": "ANTHROPIC_AUTH_TOKEN", "value": "ge_gw_<your-key>" }
]
}2. Optionally, opt APR's own policy checks into the same optimization
curl -X POST https://app.guardentry.ai/api/v2/policy-router/evaluate \
-H "Authorization: Bearer $GUARDENTRY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Delete all rows from the customers table",
"actorType": "agent.coding-assistant",
"optimizeTokens": true
}'The same response that carries your policy decision also carries tokenUsage, costUsd, and naiveCostUsd — one call, both answers.
Set up the gateway in a few minutes and watch real savings data accumulate in your dashboard.