All SafteyX endpoints require an x-api-key header. Generate keys from your dashboard under Settings → API Keys.
https://api.safteyx.comx-api-key: sftx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# cURL
curl -X POST https://api.safteyx.com/moderate/text \
-H "x-api-key: sftxs_live_xxxx" \
-H "Content-Type: application/json" \
-d '{"text": "hello world", "decision_engine_id": "engine_abc"}'
# Python
import requests
res = requests.post(
"https://api.safteyx.com/moderate/text",
headers={"x-api-key": "sftx_live_xxxx"},
json={"text": "hello world", "decision_engine_id": "engine_abc"}
)
# Node.js
const res = await fetch("https://api.safteyx.com/moderate/text", {
method: "POST",
headers: { "x-api-key": "sftx_live_xxxx", "Content-Type": "application/json" },
body: JSON.stringify({ text: "hello world", decision_engine_id: "engine_abc" })
});Keep your key secret
Never expose API keys in client-side code or public repos. Rotate immediately if compromised.
Select an endpoint from the sidebar to open the interactive playground.