curl --location --request POST 'https://services.walled.ai/v1/walled-redact' \
--header 'x-api-key: <your-walledai-api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": [
{
"role": "user",
"content": "Hi, I'\''m John Doe. I live at 123 Maple Street and my email is john.doe@example.com"
},
{
"role": "assistant",
"content": "Hello John, how can I assist you today?"
}
]
}'
{
"success": true,
"statusCode": 200,
"data": {
"input": [
{
"role": "user",
"content": "Hi, I'm John Doe. I live at 123 Maple Street and my email is john.doe@example.com"
},
{
"role": "assistant",
"content": "Hello John, how can I assist you today?"
}
],
"masked_text": [
{
"role": "user",
"content": "Hi, I’m [Person_1]. I live at [Address_1] and my email is [Email_1]."
},
{
"role": "assistant",
"content": "Hello [Person_1], how can I assist you today?"
}
],
"mapping": {
"[Person_1]": "John Doe",
"[Address_1]": "123 Maple Street",
"[Email_1]": "john.doe@example.com"
},
"error": null
}
}