Image moderation API

Image moderation API with NSFW detection

Send a JPEG, PNG, WebP or GIF as the body of one request. You get accept, review or reject, and for each category the score and the threshold it reached.

2,000 free checks a month. No card needed.

Request
curl -X POST \
  -H "Authorization: Bearer $OPENMOD_API_KEY" \
  --data-binary @photo.jpg \
  "https://api.openshield.dev/v1/image?ref=avatar_4821"
Answer, trimmedreject
{
  "summary": {
    "action": "reject",
    "reject_reason": [
      { "id": "nudity", "score": 0.97, "threshold": 0.8 }
    ]
  },
  "scores": { "nudity": 0.97, "gore": 0.01 },
  "ref": "avatar_4821"
}

What it checks

17 image categories, and what is written on the image

Suggestive content, underwear and swimwear are separate from nudity, so you can allow some and hold others. A workflow picks the categories you care about.

Image categories

  • Nudity
  • Suggestive content
  • Underwear
  • Swimwear
  • Minor
  • Knife
  • Cannabis
  • Gore
  • Violence
  • Weapon
  • Alcohol
  • Drugs
  • Smoking
  • Hate symbol
  • Offensive gesture
  • Self-harm
  • QR code
  • and your own
  • Text on the image

    Text written on an image is read and goes through the text rules: personal data, extremism and links to adult, gambling and unsafe sites.

  • QR codes

    QR codes are read, and what they hold is checked as a text and against the same lists of sites.

Your own categories

Describe what to look for, in words

A custom image category is a few short descriptions, not a model you train.

  • Up to 8 descriptions

    Each is a short sentence of up to 200 characters, such as a photo of a knife.

  • And what looks similar but is fine

    Up to 8 more, to keep the category from firing on lookalikes.

  • A shift to tune the strictness

    From -20 to 20, it moves the category toward stricter or more lenient. A workflow holds up to 20 custom categories, and each one is part of the same check.

The decision

Every decision explains itself

Each category gets a score from 0 to 1. A score at or above the reject threshold rejects the image, and one at or above the review threshold sends it to review. You set both thresholds per category in a workflow.

  • Reasons, not just a verdict

    The answer lists the categories that decided it, each with its id, score and threshold, and a sentence you can show a user.

    Responses and errors

  • Rules you can trace

    The answer and the journal name the workflow version that decided, so you can always tell which rules were in force for a past decision.

    Workflows

Limits

What you can plan with

Formats
JPEG, PNG, WebP and GIF
Request body
Up to 15 MB
Image size
Up to 50 megapixels (12 on the free plan) and 16,384 pixels on a side
From a URL
A public address, downloaded for you: 15 MB, 3 redirects, 10 seconds
What counts
One image is one check, whatever the number of categories
What is kept
The decision and your ref. Never the image.

Questions

Before you start

What is NSFW detection?
It finds nudity and sexual content in images before other people see them. In openshield that is the nudity category, with suggestive content, underwear and swimwear as separate categories you can allow or hold.
Which images can I send?
JPEG, PNG, WebP and GIF, up to 15 MB and 50 megapixels (12 on the free plan). Send the bytes as the request body, or give a public URL and we download it, with the same limits.
Do you store the images?
No. An image is checked in memory and forgotten when the answer is sent. The journal keeps the decision, the reasons and your ref.
Can it check video?
No. openshield checks images and text. It does not check video or audio.
What does an image check cost?
One image is one check, with every category included. 2,000 checks a month are free, and paid plans start at €29 a month.

Start with 2,000 free checks

No card needed. Create a key and send your first request in five minutes.

Beta prices, in euros, excluding VAT