Privacy & Logging Controls
Control what AnyRouter retains — request body capture, PII redaction, training opt-out, blocked providers, and data residency.
Routing your prompts through a gateway raises an obvious question: what does the gateway keep, and where does it go? AnyRouter answers it plainly. Request and response bodies are logged by default, on every plan, so you can inspect and debug real traffic on the Request Logs page — turn it off any time with the Body logging switch in Privacy settings. Providers that may train on your data are not used unless you opt in, and zero-data-retention routing is one switch away. A single dashboard page holds all of it, with your current stance summarized at the top.
Overview
The Privacy & safety page holds every retention and routing-policy control for your account. Settings here are global — they apply to every key and override anything set on an individual preset. The narrower controls on the Request Logs page inherit from here; you cannot widen logging on a key beyond what this page allows.
| Control | Default | What it changes |
|---|---|---|
| Log request/response bodies | On | Whether the full prompt and completion are stored |
| PII redaction | On (when logging is on) | Strips emails, phone numbers, and common secrets from stored bodies |
| Always enforce ZDR | Off | Rejects any request that cannot be routed to a zero-retention provider |
| Paid endpoints that may train on request data | Off | Allows paid models from providers that may use prompts for training |
| Free endpoints that may train on request data | Off | Allows free models from providers that train on prompts |
| Free endpoints that may publish prompts | Off | Allows free models from providers that publish prompts to public datasets |
| Blocked providers | None | List of upstreams that will never receive traffic from this account |
| Moderation plugin | Off | Scans prompts and completions against a content policy |
All settings persist immediately when toggled — there is no "save" button. Changes propagate to the routing layer within a few seconds.
Rollout status. Metadata logging (model, tokens, cost, latency, status) is on for every request. Request/response body capture is on by default on every plan as of 27 July 2026 — previously it was suppressed for paid plans, and it is now controlled solely by the Body logging switch below. PII redaction is still rolling out; toggling it saves your preference and takes effect as the pipeline reaches your region. ZDR routing, blocked providers, training consent, and moderation are all live now.
How it works
Body capture
The Log request/response bodies switch controls whether AnyRouter stores the full payload of every request: the messages array, the model output, tool calls, and attached images.
- Off (default) — AnyRouter still stores metadata: model id, upstream provider, token counts, latency, status code, timestamp, and the truncated cache key. Enough to answer "what did I spend," "which model is slowest," and "did this hit the cache" — but not enough to replay a conversation or build an evaluation set.
- On — request and response are stored alongside the metadata. Open any log entry to see the exact prompt sent and completion returned. This is the mode you want during development, when chasing a prompt-quality regression, or when building an offline eval set.
Tradeoffs to weigh before turning it on:
- Storage cost grows roughly linearly with traffic. Large agentic workloads with long tool catalogs can produce gigabytes per day.
- Sensitive data exposure — anything in the body lands in your logs. PII redaction (below) handles common cases but is not a substitute for input validation in your application.
- Caching is unaffected — prompts are hashed and cached the same way regardless of body logging.
You can flip this on for a debugging session and back off when done. Existing entries are not retroactively redacted when you turn the toggle off; they remain visible in Request Logs until they fall outside your plan's retention window.
PII redaction
When body logging is on, a second switch appears: PII redaction, enabled by default. It runs every stored prompt and completion through a redactor before persistence.
Recognized patterns out of the box:
| Pattern | Replaced with |
|---|---|
| Email addresses | [REDACTED_EMAIL] |
| Phone numbers (NANP, E.164, most international) | [REDACTED_PHONE] |
| Credit card numbers (Luhn-valid, 13–19 digits) | [REDACTED_CC] |
API keys and tokens (sk-, sk-ar-, ghp_, xoxb-, AWS keys, JWTs) | [REDACTED_SECRET] |
| IP addresses (IPv4 and IPv6) | [REDACTED_IP] |
SSN-shaped sequences (NNN-NN-NNNN) | [REDACTED_SSN] |
Redaction runs before the prompt is hashed for storage, so the stored copy is the redacted copy. The original prompt is still sent to the upstream unmodified — redaction is a logging control, not a routing control. To scrub data before it leaves your application, do that client-side.
The redactor is fast (sub-millisecond typically; 1–2 ms on very high-throughput workloads) and never blocks delivery — if it errors, the log entry is dropped and the request still succeeds. It is conservative on purpose, erring toward false positives over false negatives. Accounts on plans that expose custom redaction rules can add a regex via the API documented under Request Logs.
Training consent
Three switches control whether AnyRouter may route to providers whose terms permit training on requests.
- Paid endpoints that may train on request data — some paid models (typically smaller providers without an enterprise tier) reserve the right to use anonymized prompts. Big-name providers (OpenAI paid, Anthropic, Google paid, Cloudflare AI Gateway) do not train on paid traffic and are always allowed. On widens the paid pool; off (default) excludes any paid provider whose ToS allows training.
- Free endpoints that may train on request data — free tiers almost always come with a training clause. On opts you into that exchange; off is the default.
- Free endpoints that may publish prompts — a subset of free providers publish prompt-completion pairs to public datasets. Stronger than training; off by default and recommended off for any account handling customer data.
AnyRouter compiles your three settings into a per-account routing filter, re-evaluated on every request. If no provider is eligible after filtering — for example you blocked every provider serving a free model and set "Always enforce ZDR" — the request returns a structured 503 no_eligible_provider rather than silently falling back. We fail loud rather than violate your stated policy.
Blocked providers
The Provider restrictions panel lists every upstream AnyRouter can route to. Tap a provider to ban it for this account; tap again to unblock. Blocked providers never receive a single request from your keys, regardless of model, preset, or fallback chain. Common reasons: compliance (DPA covers only specific subprocessors), provider ToS, regional restrictions, quality issues, or a security incident at a provider.
Blocking requires no other changes — the router picks the next eligible upstream. If the only upstream for a model is blocked, requests to that model return 503 no_eligible_provider with the blocking reason in the error envelope. The block list is global to the account; to block a provider on one key but not another, route that key through a preset that pins specific upstreams (see Routing).
Data residency
AnyRouter runs on Cloudflare Workers, so entry-point compute is global and requests land at the nearest edge.
| Data | Where it lives |
|---|---|
| In-flight request data | Held in memory at the edge for the request duration, then discarded. Bodies stream to the upstream — not buffered to disk. |
| Request metadata | Cloudflare D1 in the account's primary region (reads replicate globally; writes go to one region). |
| Request bodies (when logging on) | The same D1 instance, encrypted at rest with a per-row salt. |
| API keys | Encrypted at rest in D1 with a per-row salt. Plaintext shown once at creation, never again. |
| Aggregated usage counters | Cloudflare KV for fast credit checks — globally replicated, eventually consistent. |
The upstream provider receives your prompt and is bound by its own residency commitments; pin providers in a specific region via a preset (see Routing). If your regime requires that no prompt or completion crosses a specific border, the safest configuration is body logging off, a blocked-providers list excluding every region you cannot use, and ZDR enforcement on.
Retention
- Request logs — dashboard and API read-access is clamped to the plan window: 7 days on Free and Go, 30 days on Pro and Max, 90 days on Enterprise. The same window applies whether or not bodies are stored. Older rows are not returned; AnyRouter does not run a per-plan deletion job. Only the size of each entry depends on the body-logging toggle.
- Aggregated usage data (tokens, cost, latency) is retained 365 days for monthly and quarterly reporting. It is metadata only and never contains prompt or completion text.
Custom windows (e.g. 7 days to minimize exposure, or 90 days for forensics regardless of plan) are available on accounts with a signed DPA; contact support.
Audit
Every change to any switch on this page records who (user id and email), what (old value, new value, field name), when (UTC timestamp to the millisecond), and where from (IP and user agent). Audit records live in a separate table, are retained 365 days regardless of the request-log window, and cannot be modified or deleted through the dashboard.
Who can change settings:
- Personal workspaces — only the workspace owner.
- Organization workspaces — only members with the
adminrole. Others can view but not toggle.
For a more granular permission model (e.g. a security-officer role), contact support — RBAC extensions are on the roadmap.
Configure
The card at the top of the page summarizes your current stance — whether ZDR is enforced, whether body logging is on, whether training opt-ins are open, how many providers are blocked, and whether moderation is active. It's read-only, a sanity check you can read without scrolling.
A safe configuration for a production customer-support agent that handles PII and needs body logging for offline evaluation:
- Log request/response bodies — on
- PII redaction — on
- Always enforce ZDR — on
- Paid endpoints that may train on request data — off
- Free endpoints that may train on request data — off
- Free endpoints that may publish prompts — off
- Blocked providers — any provider not covered by your DPA
- Moderation plugin — on
With this, every request lands at a ZDR-compliant paid provider, is moderated before returning, and lands in your logs with PII stripped, while the audit trail records every settings change for a year. Use an sk-ar-… key from the API Keys page against https://anyrouter.dev/api/v1/chat/completions. To verify which upstreams are actually eligible for a given model, inspect real routing decisions on the Request Logs page after a few requests.