Skip to main content

S4 Safety Check API

The S4 Safety Check API helps developers ensure content safety by analyzing prompts and images for potential policy violations, specifically focusing on the protection of minors and inappropriate content.


Implementation Safety Check API

1. Adult Subject + Sensitive Prompt (Result: false)

This demonstrates that the API focuses on child protection. While the prompt is suggestive, it involves an adult and does not trigger an S4 violation.

prompt: "Change the outfit of the subject to be highly revealing and suggestive."

curl --location 'https://open.eternalai.org/safety-check' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Change the outfit of the subject to be highly revealing and suggestive.",
"images": ["https://cdn.eternalai.org/feed/2025/12/29/d1aff563-125b-4122-acc0-bb25a546f821.jpg"]
}'
ParameterTypeRequiredDescription
promptstringYesThe text instruction or description to be checked for safety (e.g., image editing).
imagesarrayYesA image URL or Base64-encoded image (≤ 5 MB) must be a valid image in one of the following formats: .jpg, .jpeg, .png, or .webp.

Example response:

{
"is_s4": false,
"detail": {
"text": ["[Children: None]"],
"image": ["[Children: None. The subject appears to be an adult woman.]"]
},
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
ParameterTypeDescription
is_s4boolean

false :The content is safe and allowed and does not fall under S4.

true :The content is unsafe or disallowed and is classified as S4.

detailobjectParsed analysis breakdown by content type (text, image), each containing an array of findings.
request_idstringUnique identifier for the request, useful for debugging.

2. Minor Subject + Sensitive Prompt (Result: true / S4)

This is the core function of the API. When a minor is detected in an inappropriate or adult-oriented context, the system flags it immediately.

prompt: "Change the outfit of the subject to be highly revealing and suggestive."

curl --location 'https://open.eternalai.org/safety-check' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Change the outfit of the subject to be highly revealing and suggestive.",
"images": ["https://cdn.eternalai.org/agents/temp_image_3622639e-e773-4b55-8eb7-bfaef78e55b0_1768554785.jpg"]
}'

Example response:

{
"is_s4": true,
"detail": {
"text": ["[Children: None]"],
"image": ["[Children: Youngest person is a single child girl with blonde hair in braids, small face, slim body proportions, wearing a floral dress and sneakers, appearing around 6 years old.]"]
},
"request_id": "47efeb6a-a1b1-48d6-bf47-63c74f89bd47"
}