Replace Personal Information

POST
Replace personal information such as names, SSNs, and emails in a given text.

Request

This endpoint expects an object.
prompt
stringRequired
The text containing personal information to be replaced.
replace
booleanRequired
Specify whether to replace personal information or not.
replace_method
stringRequired
The method to use for replacing personal information.

Response

This endpoint returns an object
checks
list of objectsOptional
created
integerOptional
Timestamp of when the PII check was created.
id
stringOptional
Unique ID for the PII check.
object
stringOptional
Type of object (PII check).
POST
1curl -X POST https://api.predictionguard.com/PII \
2 -H "x-api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "prompt": "prompt",
6 "replace": true,
7 "replace_method": "replace_method"
8}'
200
Successful
1{
2 "checks": [
3 {
4 "new_prompt": "Hello, my name is gtao iqv and my SSN is 931-55-8224. My email is asxlp187323@hfrir.fmt",
5 "index": 0,
6 "status": "success"
7 }
8 ],
9 "created": 1,
10 "id": "pii-ybqaER20XcdJzJzyLmMItyoJ43NIk3Kj",
11 "object": "pii_check"
12}