The key or request chooses the boundary.
Data Safety before dispatch.
Choose one boundary per request: skip, log metadata, redact, block, or deny before a model sees the payload.
SkipInspectRedactBlockDeny
Five levels, one boundary.
No payload inspection.
Rules always run. Model-assisted detector spans are added when configured.
Block or deny before dispatch. Strict scanner failures fail closed.
Each level has one job.
DS0 skips inspection. DS1 keeps metadata only. DS2 redacts. DS3 blocks. DS4 denies.
Skip Data Safety inspection and continue under account, price, and health controls.
Skip Data Safety payload inspection; optional account trace storage can retain policy metadata and model responses for 30 days.
Rewrite detected supported patterns before request processing continues. Image parts are not inspected and pass through unchanged.
Block requests matching supported sensitive patterns; unavailable scanners fail closed. Requests carrying an image are blocked, since image content cannot be inspected.
Deny requests when supported detection rules identify suspected personal data. Requests carrying an image are denied, since image content cannot be inspected.
Resolve policy before model dispatch.
Deterministic redaction is the baseline. Model-assisted detector spans are added when configured. Strict levels fail closed when strict scanning is unavailable.
Resolve the selected Data Safety Level from routing.data_safety_level or the API-key default.
Rewrite deterministic matches.
Add model-assisted detector spans when configured.
Stop DS3 and DS4 traffic before dispatch.
What gets removed
Rules cover email addresses, phone numbers, Korean and US-style identifiers, card-like values, bearer tokens, API keys, private-key headers, and recovery phrase signals. Model-assisted detector spans are added when configured. DS3 and DS4 treat strict scanner unavailability as a fail-closed policy decision.