# SFW API > Nudity detection API with four content levels (Everyday, Revealing, Implied nudity, Explicit), art and adult-object flags and a blocking policy. GIF and video frames included. Processed in memory in Germany, never stored. API base: https://api.sfwapi.dev/v1 · OpenAPI: https://sfwapi.dev/openapi.json · Levels: 0 Everyday, 1 Revealing, 2 Implied nudity, 3 Explicit; scores 0-100, above 50 counts. ## For coding agents - [Full docs in one file](https://sfwapi.dev/llms-full.txt): read this first - Markdown for any docs page: https://sfwapi.dev/md/ (for example https://sfwapi.dev/md/quickstart) - Claude Code plugin: claude plugin marketplace add superstreber3/sfwapi-agent-tools then claude plugin install sfwapi@sfwapi-agent-tools · source https://github.com/superstreber3/sfwapi-agent-tools · MCP server: coming soon - Prompt for any agent: Add nudity moderation to image uploads using the SFW API. Read https://sfwapi.dev/llms-full.txt first. Use the official SDK if one exists for this language (npm @sfwapi/sdk, pip sfwapi), otherwise POST to https://api.sfwapi.dev/v1/analyze. Block at level 2 and above by default and make the level configurable. Keep the API key in the environment variable SFWAPI_API_KEY on the server and never send it to the browser. Retry only on 429 and 503, using the Retry-After header. ## Docs - [Use it from Claude Code, Codex or Cursor](https://sfwapi.dev/docs/ai-agents): Install the SFW API skill in your coding agent or paste one prompt, and let the agent write the integration against our Markdown docs. - [Analyze endpoint](https://sfwapi.dev/docs/analyze): POST /v1/analyze — inputs (URL, base64, multipart), options (max_frames, include_frames, policy) and the full response. - [Authentication](https://sfwapi.dev/docs/authentication): API keys, where to keep them, rotation and revocation. - [Data handling and privacy](https://sfwapi.dev/docs/data-handling): What is processed, what is stored and for how long, where it runs, and who the sub-processors are. - [Errors and retries](https://sfwapi.dev/docs/errors): The error envelope, every code, what is charged, and how to retry. - [GIF and video](https://sfwapi.dev/docs/gif-and-video): How frames are sampled, what they cost, and how to read per-frame results. - [Overview](https://sfwapi.dev/docs): What the SFW API returns, how the four nudity levels work, and the mental model in sixty seconds. - [Understanding levels](https://sfwapi.dev/docs/levels): What each of the four nudity levels means, how scores become a level, and what never raises the level. - [Policies](https://sfwapi.dev/docs/policies): Send your moderation settings with the request and get a blocked verdict, computed exactly like the SfwBot Discord bot does. - [Quickstart](https://sfwapi.dev/docs/quickstart): Get a free API key and analyse your first image with curl, TypeScript or Python in two minutes. - [Rate limits and credits](https://sfwapi.dev/docs/rate-limits-and-credits): How requests are limited per key and account, how credits are counted, and how auto-recharge works. - [Python SDK](https://sfwapi.dev/docs/sdks/python): The sfwapi package, sync and async, on httpx. - [TypeScript SDK](https://sfwapi.dev/docs/sdks/typescript): @sfwapi/sdk for Node 18+, Bun, Deno and edge runtimes. ## Product - [Pricing](https://sfwapi.dev/pricing): 500 free credits/month, prepaid packs from $10 per 10,000 credits - [Accuracy & methodology](https://sfwapi.dev/accuracy): 9 of 10 explicit images caught; Fewer than 2 in 100 everyday photos flagged; 19 of 20 images land on the exact level - [Playground](https://api.sfwapi.dev/playground) ## Compare - [sightengine](https://sfwapi.dev/compare/sightengine) - [aws-rekognition](https://sfwapi.dev/compare/aws-rekognition) - [google-safesearch](https://sfwapi.dev/compare/google-safesearch) - [hive](https://sfwapi.dev/compare/hive) ## Use cases - [discord-bots](https://sfwapi.dev/use-cases/discord-bots) - [telegram-bots](https://sfwapi.dev/use-cases/telegram-bots) - [user-uploads](https://sfwapi.dev/use-cases/user-uploads) - [ai-image-generation](https://sfwapi.dev/use-cases/ai-image-generation) ## Legal - [Terms](https://sfwapi.dev/legal/terms) · [Privacy](https://sfwapi.dev/legal/privacy) · [DPA](https://sfwapi.dev/legal/dpa) · [Acceptable use](https://sfwapi.dev/legal/aup)