All plans are🏷️30% OFFfor a limited time!www.cyliumos.online
CyliumOS
API DOCUMENTATION

NSFW & Visual Safety Detector Documentation

Complete API reference, integration examples, authentication guidelines, and response structures.

Overview

Enterprise-grade visual content moderation API powered by NudeNet. Detect explicit content, suggestive nudity, and safety policy violations with millisecond latency, bounding boxes, and half-nudity filtering.

Endpoint
POST /is_safe
· Base URL:https://nsfw.cyliumos.online

Authentication

Authenticate every HTTP request using the custom X-API-Key header:

X-API-Key: cyk_live_xxxxxxxxxxxxxxxxxxxxxxxx

Do not expose your private key in client-side applications. Proxy requests through your backend service or Edge Workers.

Code Examples

Multi-Language SDKs
cURL — request
curl -X POST "https://nsfw.cyliumos.online/is_safe" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cyk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -d '{
    "image": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
    "detection_point": true
  }'

NSFW & Visual Safety Detector API

High-speed visual safety inspection API designed to eliminate inappropriate and explicit imagery before it reaches your users.

Authentication

Pass your universal API key in the X-API-Key header:

Code Snippet
X-API-Key: cyk_live_...

Endpoint

POST /is_safe

Request Headers

HeaderTypeRequiredDescription
Content-TypestringYesapplication/json
X-API-KeystringYesUniversal API Key generated from dashboard

Request Body (JSON)

FieldTypeRequiredDescription
imagestringYesBase64-encoded image string (with or without data URI header)
half_nuditystringNo"disabled" (default) or "enabled"
detection_pointbooleanNoSet true to return bounding coordinates

Response Schema (200 OK)

Code Snippet
{
  "success": true,
  "issafe": true,
  "message": "Image is safe",
  "detections": []
}

Code Examples

cURL

Code Snippet
curl -X POST "http://localhost:8001/is_safe" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cyk_live_x9z0abcdef" \
  -d '{
    "image": "data:image/jpeg;base64,...",
    "half_nudity": "enabled",
    "detection_point": true
  }'

TypeScript / JavaScript

Code Snippet
const res = await fetch("http://localhost:8001/is_safe", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "cyk_live_x9z0abcdef",
  },
  body: JSON.stringify({
    image: base64Data,
    half_nudity: "enabled",
    detection_point: true,
  }),
});
const result = await res.json();
console.log("Safe:", result.issafe);

Python

Code Snippet
import requests

response = requests.post(
    "http://localhost:8001/is_safe",
    headers={"X-API-Key": "cyk_live_x9z0abcdef"},
    json={
        "image": base64_image,
        "half_nudity": "enabled",
        "detection_point": True,
    },
)
print(response.json())

Error Codes

StatusError CodeDescription
400invalid_imageMalformed base64 image payload
401missing_api_keyX-API-Key header omitted
401invalid_api_keyKey not found in Firestore
403service_not_subscribedUser has not subscribed to nsfw-detection
403api_key_inactiveKey is revoked or expired
429monthly_limit_reachedMonthly plan quota exhausted

Status & Error Responses

400 Bad Request
Input payload is empty, missing, or malformed.
{
  "detail": {
    "success": false,
    "error": "invalid_payload",
    "message": "Invalid request payload"
  }
}
401 Unauthorized
The X-API-Key header is missing or the key is not recognised.
{
  "detail": {
    "success": false,
    "error": "missing_api_key",
    "message": "X-API-Key header is required"
  }
}
402 Payment Required
No active subscription for this service.
{
  "detail": {
    "success": false,
    "error": "subscription_required",
    "message": "An active subscription is required to access this service"
  }
}
403 Forbidden
The key was revoked or has expired.
{
  "detail": {
    "success": false,
    "error": "api_key_expired",
    "message": "API key has expired or is revoked"
  }
}
429 Too Many Requests
Monthly request quota or rate limit has been reached.
{
  "detail": {
    "success": false,
    "error": "rate_limit_reached",
    "message": "Monthly API request limit reached"
  }
}
500 Internal Error
Server error occurred while processing the request.
{
  "detail": {
    "success": false,
    "error": "internal_error",
    "message": "Internal processing error"
  }
}

Sample Response

Example payload structure returned by this service.

{
  "success": true,
  "issafe": false,
  "message": "Explicit visual content detected",
  "detections": [
    {
      "label": "FEMALE_GENITALIA_EXPOSED",
      "score": 0.96,
      "top_left": [
        120,
        85
      ],
      "bottom_right": [
        280,
        240
      ],
      "box": [
        120,
        85,
        160,
        155
      ]
    }
  ]
}
Ready to test?

Head over to the playground to upload your own files and inspect live bounding boxes and classifications.

Open Playground