Walled Ai
  1. api reference
Walled Ai
  • walledai
    • Introduction To WalledAi
    • Error Codes
    • sdk
      • Walled AI SDK (Python)
      • Walled AI SDK (Node.js)
    • api reference
      • walledprotect
        POST
      • walledredact
        POST
  1. api reference

walledprotect

POST
https://services.walled.ai/v1/walled-protect
The WalledProtect provides comprehensive content moderation capabilities including safety checks, compliance validation, PII detection, and greeting analysis.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

🟠403Forbidden
🟠400Bad Request
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://services.walled.ai/v1/walled-protect' \
--header 'x-api-key: <your-walledai-api-key>' \
--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?"
		}
	],
	"greetings_list": [
		"Casual & Friendly",
		"Professional & Polite"
	],
	"generic_safety_check": true,
	"compliance_list": [
		"Medical",
		"Finance",
		"Legal"
	],
	"pii_list": [
		"Person'\''s Name",
		"Address",
		"Email Id",
		"Contact No",
		"Date Of Birth",
		"Unique Id",
		"Financial Data"
	]
}'
Response Response Example
200 - Success
{
    "success": true,
    "statusCode": 200,
    "data": {
        "safety": [
            {
                "safety": "generic",
                "isSafe": false,
                "score": null,
                "method": "en-safety",
                "processing_time": 0.42882490158081055,
                "models_used": [
                    "walled_e_guard_a"
                ]
            }
        ],
        "compliance": [
            {
                "topic": "sdfsdf",
                "isOnTopic": false,
                "error": null
            }
        ],
        "pii": [
            {
                "pii_type": "Person's Name",
                "isPresent": true,
                "error": null
            },
            {
                "pii_type": "Address",
                "isPresent": true,
                "error": null
            },
            {
                "pii_type": "Email Id",
                "isPresent": true,
                "error": null
            },
            {
                "pii_type": "Contact No",
                "isPresent": false,
                "error": null
            },
            {
                "pii_type": "Date Of Birth",
                "isPresent": false,
                "error": null
            },
            {
                "pii_type": "Unique Id",
                "isPresent": false,
                "error": null
            },
            {
                "pii_type": "Financial Data",
                "isPresent": false,
                "error": null
            }
        ],
        "greetings": [
            {
                "greeting_type": "Casual & Friendly",
                "isPresent": true,
                "error": null
            },
            {
                "greeting_type": "Professional & Polite",
                "isPresent": true,
                "error": null
            }
        ]
    }
}
Modified at 2025-08-28 08:38:52
Previous
Walled AI SDK (Node.js)
Next
walledredact
Built with