SFW API

v0.1.2
dev.sfwapi/mcp Checked 4 days ago Published 4 days ago

Nudity detection for images, GIFs and videos: a level from 0 to 3 and a blocked or allowed verdict.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

analyze_url Analyze media at a URL

Detect nudity in an image, GIF or video at a public http(s) URL. Returns the content level (0 Everyday, 1 Revealing, 2 Implied Nudity, 3 Explicit), a score per level, and flags for drawn content and adult objects. Costs 1 credit per image, or 1 per analysed frame for a GIF or video; failed calls are free. The media is processed in memory and never stored.

ParameterTypeDescription
url *stringPublic http(s) URL of the image, GIF or video.
artstringWith block_level: how drawings, anime and other stylised content are treated. Default same_as_photos.
block_levelApply a policy: block at this level or above (1 Revealing, 2 Implied nudity, 3 Explicit). The result then carries policy.blocked.
block_sex_objectsbooleanWith block_level: also block adult toys and objects.
include_framesbooleanReturn per-frame scores for a GIF or video.
max_framesintegerFrames sampled from a GIF or video (default 5 for GIF, 10 for video). One credit per frame.

analyze_file Analyze a local file

Detect nudity in a local image, GIF or video file. The file is uploaded to the SFW API and analysed; the result has the same shape as analyze_url. Costs 1 credit per image, or 1 per analysed frame for a GIF or video; failed calls are free. The media is processed in memory and never stored.

ParameterTypeDescription
path *stringPath of the file on this machine, absolute or relative to the working directory.
artstringWith block_level: how drawings, anime and other stylised content are treated. Default same_as_photos.
block_levelApply a policy: block at this level or above (1 Revealing, 2 Implied nudity, 3 Explicit). The result then carries policy.blocked.
block_sex_objectsbooleanWith block_level: also block adult toys and objects.
include_framesbooleanReturn per-frame scores for a GIF or video.
max_framesintegerFrames sampled from a GIF or video (default 5 for GIF, 10 for video). One credit per frame.

get_account Credits and limits

Show the credit balance, the plan and its limits, and this month's usage for the API key in use. Free; does not use credits.