Skip to navigation

Redact a file

Redacts a TXT, DOCX or PDF file and answers its text redacted, or with output: "file" the redacted file too.

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 a multipart form containing a file.
filefileRequired

A TXT, DOCX or PDF file of at most 10 MB; never stored.

optionsobjectOptional

The redact options, as JSON in the options part.

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 as JSON, or multipart/mixed with the redacted file.

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