{"openapi":"3.2.0","info":{"title":"Porn Detection API","description":"Porn Detection API allows you to upload an image or a video for scanning. It returns whether the content is safe for work (SFW) or not safe for work (NSFW), along with a confidence score.","version":"1.0.0"},"servers":[{"url":"https://rasot.jojapi.net"}],"security":[{"ApiKeyAuth":[]}],"x-agent-commerce":{"catalog_url":"https://rasot.jojapi.net/_jojapi/agent/plans","discovery_url":"https://rasot.jojapi.net/.well-known/x402","directory_url":"https://agents.jojapi.net/apis/porn-detection-api","docs":"https://docs.jojapi.com/consumers/agents"},"paths":{"/predict_image_upload":{"post":{"operationId":"post_predict_image_upload","summary":"predict_image_upload","description":"This endpoint allows you to upload images directly to the API for instant and accurate analysis.\nThe system processes the image and returns the probability score of containing pornographic content (NSFW Score), comparing it with the threshold you define.\nIf the score exceeds the threshold, the image is classified as unsafe; if it is below, the image is considered safe.","responses":{"200":{"description":"Response","content":{"application/json":{"examples":{"Response":{"summary":"Response","value":{"label":"SFW","is_nsfw":false,"nsfw_prob":0.003256,"sfw_prob":0.996744,"threshold":0.8,"confidence":0.99593,"confidence_level":"very_high","distance_from_threshold":0.796744}}}}}}},"parameters":[{"name":"threshold","in":"query","required":false,"schema":{"type":"string","example":"0.8","default":"0.8"}},{"name":"file","in":"header","required":true,"schema":{"type":"string"}}]}},"/predict_video_url":{"get":{"operationId":"get_predict_video_url","summary":"predict_video_url","description":"This endpoint accepts a direct video link (HTTP/HTTPS) and scans it instantly to classify the content.\nThe API returns:\n\nWhether the video is pornographic or safe.\n\nThe reason for the decision (e.g., strong_peak, long_streak, high_ratio).\n\nDetailed statistics: highest probability, average probability, total duration above the threshold, and number of analyzed samples.","responses":{"200":{"description":"Response","content":{"application/json":{"examples":{"Response":{"summary":"Response","value":{"nsfw":false,"reason":"below_thresholds","thresholds":{"thresh_high":0.7,"thresh_low":0.6,"min_hit_duration":1,"min_ratio":0.02},"stats":{"max_prob":0.008028,"avg_prob":0.007325,"total_duration":2,"total_above_duration":0,"ratio_above":0,"max_streak":0,"sample_step":1,"num_samples":3}}}}}}}},"parameters":[{"name":"smooth_window","in":"query","required":false,"schema":{"type":"number","example":5}},{"name":"duration_sec","in":"query","required":false,"schema":{"type":"number","example":0}},{"name":"thresh_high","in":"query","required":false,"schema":{"type":"number","example":0.7}},{"name":"thresh_low","in":"query","required":false,"schema":{"type":"number","example":0.6}},{"name":"min_hit_duration","in":"query","required":false,"schema":{"type":"number","example":1}},{"name":"video_url","in":"query","required":true,"schema":{"type":"string"}},{"name":"min_ratio","in":"query","required":false,"schema":{"type":"number","example":0.02}},{"name":"start_sec","in":"query","required":false,"schema":{"type":"number","example":0}}]}},"/predict_image_url":{"get":{"operationId":"get_predict_image_url","summary":"predict_image_url","description":"Analyze an image from a direct URL and return whether it’s SFW (Safe For Work) or NSFW (Not Safe For Work), with a confidence score.","responses":{"200":{"description":"Response","content":{"application/json":{"examples":{"Response":{"summary":"Response","value":{"label":"SFW","is_nsfw":false,"nsfw_prob":0.000733,"sfw_prob":0.999267,"threshold":0.7,"confidence":0.998953,"confidence_level":"very_high","distance_from_threshold":0.699267}}}}}}},"parameters":[{"name":"threshold","in":"query","required":false,"schema":{"type":"number","example":0.7,"default":0.7}},{"name":"image_url","in":"query","required":true,"schema":{"type":"string"}}]}},"/request_video_upload_url":{"get":{"operationId":"get_request_video_upload_url","summary":"request_video_upload_url","description":"This endpoint provides you with a dedicated upload URL for your video.\nThe URL is designed for speed and efficiency, allowing you to upload large video files seamlessly.\nIt can be used once only and remains valid for 24 hours from the time it is issued.\nTo upload, send your video in the file field of the request body (form-data).\nOnce the upload is complete, the API will automatically analyze the video and return the classification result with probability scores.","responses":{"200":{"description":"Response","content":{"application/json":{"examples":{"Response":{"summary":"Response","value":{"url":"http://134.209.196.160:6666/upload_video?key=HP-zZeT-KBvMyBuS"}}}}}}},"parameters":[{"name":"start_sec","in":"query","required":false,"schema":{"type":"number","example":0,"default":0}},{"name":"duration_sec","in":"query","required":false,"schema":{"type":"number","example":0,"default":0}},{"name":"min_ratio","in":"query","required":false,"schema":{"type":"number","example":0.02,"default":0.02}},{"name":"smooth_window","in":"query","required":false,"schema":{"type":"number","example":5,"default":5}},{"name":"thresh_high","in":"query","required":false,"schema":{"type":"number","example":0.7,"default":0.8}},{"name":"min_hit_duration","in":"query","required":false,"schema":{"type":"number","example":1,"default":1}},{"name":"thresh_low","in":"query","required":false,"schema":{"type":"number","example":0.6,"default":0.7}}]}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-JoJAPI-Key","description":"Your JoJ API key."}}}}