Five levels, one boundary.

PickDS0-DS4

The key or request chooses the boundary.

SkipDS0

No payload inspection.

RedactDS2

Rules always run. Model-assisted detector spans are added when configured.

StopDS3/DS4

Block or deny before dispatch. Strict scanner failures fail closed.

Data Safety

Each level has one job.

DS0 skips inspection. DS1 keeps metadata only. DS2 redacts. DS3 blocks. DS4 denies.

DS0 Skip policy inspection

Skip Data Safety inspection and continue under account, price, and health controls.

DS1 Inspection off; trace storage optional

Skip Data Safety payload inspection; optional account trace storage can retain policy metadata and model responses for 30 days.

DS2 Redact protected fields

Rewrite detected supported patterns before request processing continues. Image parts are not inspected and pass through unchanged.

DS3 Block sensitive payloads

Block requests matching supported sensitive patterns; unavailable scanners fail closed. Requests carrying an image are blocked, since image content cannot be inspected.

DS4 Deny suspected personal data

Deny requests when supported detection rules identify suspected personal data. Requests carrying an image are denied, since image content cannot be inspected.

Pipeline

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.

1Policy

Resolve the selected Data Safety Level from routing.data_safety_level or the API-key default.

2[REDACTED_*]

Rewrite deterministic matches.

3[REDACTED_NER]

Add model-assisted detector spans when configured.

4Block / deny

Stop DS3 and DS4 traffic before dispatch.

Removal method

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.

[REDACTED_EMAIL][REDACTED_PHONE][REDACTED_NER]Korean RRNUS SSN[REDACTED_SECRET][REDACTED_SSN]Bearer/API keysPrivate-key headersRecovery phrase signalsReplace or denyAttach policy result
CPEN Router — OpenAI-Compatible AI API