Ga naar inhoud

Prudai Developer API: anonimiseren

Mask personal data in a file or text the caller sends (nothing stored). Personal tokens only; never issuable to a service key.

Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.

MethodePadWat het doetStand
POST/v1/anonymization/analyzeCount what would be masked in a file (dry run of anonymizeDocument)Binnenkort
POST/v1/anonymization/documentMask personal data in a file and get the masked copy (raw bytes)Binnenkort
POST/v1/anonymization/textMask personal data in a textBinnenkort

Count what would be masked in a file (dry run of anonymizeDocument)

POST /v1/anonymization/analyze

Personal tokens only. Send one file (.pdf, .docx, .txt, .md or .eml) as multipart field file. Returns per category how many personal data items would be masked; the values themselves are not returned. Nothing is stored, shared or changed. Recognition runs in Prudai’s own anonymizer service (patterns with checks, the organisation’s own reference patterns and learned terms, and named-entity recognition); no AI pass and no other processor. An .eml is read as text (headers From/To/Cc/Subject/Date plus the text parts); attachments are counted in eml.attachments_not_included and not read.

Categories (types, comma-separated; default the first eight): person, address (with postcode), bsn, iban, email, phone, date_of_birth, reference (case and reference numbers), and on request organization, kvk, license_plate, other, or all. accept=high (default) counts only findings with high confidence; accept=all also the low ones.

This is an aid, not a guarantee: the copy is “gemaskeerd, controleer vóór gebruik”, not “AVG-anoniem”.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:anonymization:read
  • Goedkeuring: none, geen extra stap.

Parameters

  • types query · string
    Comma-separated categories: person, address, bsn, iban, email, phone, date_of_birth, reference (default these eight), organization, kvk, license_plate, other, or all. max. lengte 300
  • acknowledge_untexted_pages query · string
    A scanned PDF page without text cannot be masked; true masks the text pages anyway and leaves those pages as they are. Een van: true, false

Body

Formaat: multipart/form-data.

Antwoorden

StatusBetekenis
200Counts per category.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
413The file exceeds the upload size limit (request_too_large).
415Not a supported format (unsupported_format).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s -X POST "https://api.prudai.com/v1/anonymization/analyze" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo anonymization analyze

Mask personal data in a file and get the masked copy (raw bytes)

POST /v1/anonymization/document

Personal tokens only. Same input and categories as analyzeAnonymization. Not the task envelope on success: the body is the masked copy, Content-Type: application/octet-stream, Content-Disposition: attachment with the name <name>_geanonimiseerd.<ext>, Cache-Control: no-store, and the header X-Prudai-Anonymization-Report: base64 of a JSON report (filename, replacements, counts_by_type, distinct_values, residual_check, warnings, eml) without any found value. An .eml comes back as a masked <name>.eml_geanonimiseerd.txt (headers and text parts; attachments are not included). Nothing is stored on our side; the original and the copy stay with the caller. Errors are the normal envelope: 422 nothing_to_anonymize when nothing of the requested types was found (no copy is made), 422 untexted_pages style errors from the service for scanned PDF pages (pass acknowledge_untexted_pages=true to mask the text pages anyway).

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:anonymization:read
  • Goedkeuring: none, geen extra stap.

Parameters

  • types query · string
    Comma-separated categories: person, address, bsn, iban, email, phone, date_of_birth, reference (default these eight), organization, kvk, license_plate, other, or all. max. lengte 300
  • acknowledge_untexted_pages query · string
    A scanned PDF page without text cannot be masked; true masks the text pages anyway and leaves those pages as they are. Een van: true, false

Body

Formaat: multipart/form-data.

Antwoorden

StatusBetekenis
200The masked copy.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
413The file exceeds the upload size limit (request_too_large).
415Not a supported format (unsupported_format).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.

Formaat van het antwoord: application/octet-stream.

curl
curl -s -X POST "https://api.prudai.com/v1/anonymization/document" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo anonymization document

Mask personal data in a text

POST /v1/anonymization/text

Personal tokens only. Returns text with the personal data of the requested categories replaced by labels, plus counts_by_type. Same recognition and categories as anonymizeDocument (own service, no AI pass, no other processor). Nothing is stored. Up to 100,000 characters. Use this from an assistant (MCP) to mask a passage before quoting or sharing it; for files use prudai anonymize <file>.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:anonymization:read
  • Goedkeuring: none, geen extra stap.

Body

JSON, verplicht.

  • text string verplicht
    max. lengte 100000
  • types array<string>
    Categories to mask; default the first eight. Een van: person, address, bsn, iban, email, phone, date_of_birth, reference, organization, kvk, license_plate, other, all
  • accept string
    Een van: high, all · standaard: "high"

Antwoorden

StatusBetekenis
200The masked text.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s -X POST "https://api.prudai.com/v1/anonymization/text" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "string",
"types": [
"person"
],
"accept": "high"
}'
CLI (binnenkort)
prudai leo anonymization text