Great Work Labs
Models / Vision

Curtain

NSFW image detection
curtain-1

Keep explicit images out of your uploads.

Price$0.10 per 1,000 images
Speed (our servers)1355 to 1701 ms
LanguagesNot applicable
InputImage, up to 10 MB
Built onAdamCodd/vit-base-nsfw-detector (Apache-2.0)

Curtain scores an image as safe or NSFW (nudity and explicit sexual content). Run it on uploads, avatars and generated images before anyone sees them.

Use it

curl https://labs.greatwork.company/v1/run \
  -H "Authorization: Bearer $GWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "curtain-1",
  "input": "https://labs.greatwork.company/examples/street.jpg"
}'

Set GWL_API_KEY to a key from your dashboard. The bare name curtain works too and follows new versions.

Options

input: An image: an https URL, a data URL (`data:image/png;base64,...`), or a file in a multipart upload. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 10 MB.

NameTypeDefaultWhat it does
thresholdnumber0.5Score at or above which an image counts as NSFW.

Output

FieldTypeMeaning
nsfwbooleanTrue when score is at or above threshold.
scorenumberProbability the image is NSFW, 0 to 1.

Every response wraps this in {"id", "model", "output", "usage": {"units", "unit", "cost_usd"}, "latency_ms"}.

Examples

Street photo

{
  "model": "curtain-1",
  "input": "/examples/street.jpg"
}
{
  "nsfw": false,
  "score": 0
}

Captured on our production servers: 1355 ms, 1 image, $0.0001.

Product photo

{
  "model": "curtain-1",
  "input": "/examples/product.jpg"
}
{
  "nsfw": false,
  "score": 0
}

Captured on our production servers: 1701 ms, 1 image, $0.0001.

Good for

  • Screen profile photos
  • Filter user uploads on a marketplace
  • Check AI-generated images before showing them
  • Blur thumbnails in a feed

Limits and caveats

  • Covers nudity and sexual content only: not violence, gore or drugs.
  • Art, swimwear and medical images can score high; keep a review step for edge cases.

Pricing

$0.10 per 1,000 images. One unit per image. Failed calls aren't charged, and a call never costs more than its estimate (POST /v1/estimate tells you before you run it).

Built on

AdamCodd/vit-base-nsfw-detector, 86M (ViT-base) parameters. License: Apache-2.0. We run it on our servers.