Redact a batch of records
Redacts up to 100 records, keeping their order and ids. Records without an id are numbered rec-<n>. Each record is metered, as corpus.redact.
POST
/v1/corpus/redactAuthorization
AuthorizationBearer token (JWT) · headerrequiredBearer API key issued for your account. Send Authorization: Bearer <key>.
Request body
requiredapplication/jsonrecordsCorpusRecord[]requiredmin items 1 · max items 100
Show propertiesHide properties
Array of
CorpusRecordidstringOptional; defaults to rec-<n>.
textstringrequiredResponses
200
Redacted records
recordsobject[]requiredShow propertiesHide properties
Array of
objectidstringrequiredredacted_textstringrequiredfindingsPiiFinding[]requiredShow propertiesHide properties
Array of
PiiFindingentity_typestringrequiredstartintegerrequiredByte offset of the first byte of the span.
endintegerrequiredByte offset one past the last byte.
scorenumberrequired0 to 1.
findings_totalintegerrequired400
Bad request
string401
Missing or invalid bearer token
string403
Billing or plan entitlement blocked the request
string502
Upstream service (arXiv, YouTube, web page) failed
string503
The backing service is not configured or is busy
string