{"openapi":"3.1.0","info":{"title":"NSFW Detection API","version":"1.0.0","description":"Moderate images automatically with on-device machine learning. Classify any image across five categories — neutral, drawing, sexy, porn and hentai — and receive per-class probabilities, the top class, a combined NSFW score and a clear verdict (safe, questionable or nsfw). A simpler check endpoint returns a single safe/unsafe decision against a threshold you choose, ideal for upload gates and user-generated-content pipelines. Supply an image by public URL, base64 or a raw binary request body; only public http/https URLs are accepted and private or internal hosts are blocked, and large images are downscaled automatically. Runs locally on TensorFlow (NSFWJS / MobileNetV2) — no third-party upstream and no per-image cloud cost — with a warm model that keeps inference fast. Ideal for community platforms, marketplaces, dating and chat apps, and any service that accepts user images.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/nsfw-api","description":"oanor gateway"}],"tags":[{"name":"NSFW"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/check":{"get":{"operationId":"get_v1_check","tags":["NSFW"],"summary":"Simple safe/unsafe decision","description":"","parameters":[{"name":"url","in":"query","required":false,"description":"Image URL (or base64/raw body)","schema":{"type":"string"},"example":""},{"name":"base64","in":"query","required":false,"description":"Base64 image data","schema":{"type":"string"},"example":"iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAZElEQVR42u3QQREAAAgDoPUPuhqaw5MHBUjb+SwCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEDAfQsbYRN2hzEcHgAAAABJRU5ErkJggg=="},{"name":"threshold","in":"query","required":false,"description":"NSFW threshold 0..1 (default 0.6)","schema":{"type":"string"},"example":"0.6"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"safe":true,"threshold":0.6,"top_class":"Neutral","nsfw_score":0.0008},"meta":{"timestamp":"2026-05-31T03:47:44.172Z","request_id":"eb816e53-5961-4837-8f20-e3477e10a3ad"},"status":"ok","message":"Image checked","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/classify":{"get":{"operationId":"get_v1_classify","tags":["NSFW"],"summary":"Full NSFW class breakdown","description":"","parameters":[{"name":"url","in":"query","required":false,"description":"Image URL (or base64/raw body)","schema":{"type":"string"},"example":""},{"name":"base64","in":"query","required":false,"description":"Base64 image data","schema":{"type":"string"},"example":"iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAZElEQVR42u3QQREAAAgDoPUPuhqaw5MHBUjb+SwCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEDAfQsbYRN2hzEcHgAAAABJRU5ErkJggg=="}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"safe":true,"classes":{"porn":0.0002,"sexy":0,"hentai":0.0006,"drawing":0.0031,"neutral":0.9961},"verdict":"safe","top_class":"Neutral","nsfw_score":0.0008},"meta":{"timestamp":"2026-05-31T03:47:44.345Z","request_id":"980c7f31-39db-4a14-bc74-dd39d4c455c3"},"status":"ok","message":"Image classified","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":3000,"rps_limit":1,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":1350,"monthly_call_quota":45000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3700,"monthly_call_quota":300000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":9400,"monthly_call_quota":1400000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/nsfw-api"}