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-Key
JWT only: the user’s context key, 43 base64url characters.
Request
This endpoint expects a multipart form containing a file.
file
A TXT, DOCX or PDF file of at most 10 MB; never stored.
options
The redact options, as JSON in the options part.
Response headers
Cache-Control
Always no-store.
Allowed values:
Request-Id
The request's id.
RateLimit
The quota left in the current window.
RateLimit-Policy
The rate-limit policy in force.
Response
The redacted text as JSON, or multipart/mixed with the redacted file.
redacted_text
The redacted text.
tokens
The text's billed tokens.
expires_at
When the stored mapping expires (24 hours).
entities
The mapping, with store_entity_mapping: false or detailed: true.
spans
With detailed: true: every finding.
model
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