Skip to navigation

Redact text

Replaces personal data in text with tags and keeps the mapping sealed under your key.

Authentication

AuthorizationBearer

An API key: Authorization: Bearer bl_live_….

OR
AuthorizationBearer

Blende’s apps: a sign-in JWT, sent with Blende-Context-Key.

Headers

Blende-Context-KeystringOptionalformat: "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"=43 characters

JWT only: the user’s context key, 43 base64url characters.

Request

This endpoint expects an object.
textstringRequired<=50000 characters

The text; at most 50,000 code points.

redaction_policyenum or string or objectOptional

A built-in name, a saved policy’s id or an inline policy.

store_entity_mappingbooleanOptionalDefaults to true

false stores nothing and answers the mapping instead.

detailedbooleanOptionalDefaults to false

true adds the mapping, the spans and the model.

Response headers

Cache-ControlenumOptional

Always no-store.

Allowed values:
Request-IdstringOptional
The request's id.
RateLimitstringOptional
The quota left in the current window.
RateLimit-PolicystringOptional

The rate-limit policy in force.

Response

The redacted text.
redacted_textstring
The redacted text.
tokensinteger>=0
The text's billed tokens.
expires_atdatetimeOptional

When the stored mapping expires (24 hours).

entitieslist of objectsOptional

The mapping, with store_entity_mapping: false or detailed: true.

spanslist of objectsOptional

With detailed: true: every finding.

modelenumOptional

With detailed: true: the model that answered.

Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
415
Unsupported Media Type Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error