Scenario's API analyzes all uploaded or generated assets to provide an Not Safe For Work indicator. It is then up to you to handle it regarding your usage of results. For example, you might leverage the CDN image processing capability to blur the image before distribution.

To access the NSFW indication, please leverages the GET /assets method. The API responses contains the NSFW labels as an array of strings.

For example, the following responses contains the non_explicit label:

{
    "asset": {
        "id": "TNmDyr8DTlS9OxhOd12wqA",
        "url": "https://cdn.cloud.scenario.com/assets-transform/TNmDyr8DTlS9OxhOd12wqA?p=100&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uY2xvdWQuc2NlbmFyaW8uY29tL2Fzc2V0cy10cmFuc2Zvcm0vTkZKc0sxdTVSeHlJbDdvTEdQTnVRdz9wPTEwMCoiLCJDb25kaXRpb24iOnsiRGF0123456789GFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2OTczMjc50123456789__&Key-Pair-Id=K36FIAB9LE2OLR&Signature=a7kWJBG1e15CWmMYpEp6xzEOTgqlGbqBC~HiiNxzXj2hxkZA2dj2hAVcqNWi4SNXc~CwTVMbU8hHelMctVuINfDScFsQHiCIaBCMO9JZivJktQ0eyCcB-lbTTMJ3CGLxw4otr8SkMhV-0QxmfNSrzNVXMDrqLkjB5vUuGm3tGoqVTd3aqoFAhYlTaxuDKLYwkRRqMJjGr4WRFF1QejdOm7VEUe5jMmxc5FK8S3ZUq4jHWML-1ZnRc92ji6hWBnQ4e3XxV3aO58JCEbMqJQ0XzW336eY-owJxnCpSZ--N4vLWtMIAn-~bN7f-LGF00gMKP-5F5tdxHMSXnMdpBxLSkg__",
        "mimeType": "image/png",
        "metadata": {
            "type": "inference-txt2img",
            "seed": "602245905551964461",
            "modelId": "YmyINMSST5-Ia8ZtsOAlXw",
            "kind": "image",
            "inferenceId": "Spxt0123456789U7f9mjvQ",
            "progressPercent": 100,
            "prompt": "a woman holding a sword on the battlefiled",
            "negativePrompt": "",
            "width": 512,
            "size": 402984,
            "height": 512
        },
        "ownerId": "XXXXXXXXXXXXXXXXXXXXXX",
        "authorId": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
        "description": "anime girl with long hair holding a sword in her hand",
        "createdAt": "2023-10-04T11:52:22.923Z",
        "updatedAt": "2023-10-04T11:52:22.923Z",
        "privacy": "private",
        "tags": [],
        "collectionIds": [],
        "nsfw": [
            "non_explicit"
        ],
        "status": "success"
    }
}

Possible values for the nsfw response's property. They are the "top categories":

  • explicit_nudity (deprecated as of March 4, 2024)
  • suggestive (deprecated as of March 4, 2024)
  • explicit
  • non_explicit
  • swimwear_underwear
  • violence
  • visually_disturbing
  • drugs
  • tobacco
  • alcohol
  • rude_gestures
  • gambling
  • hate_symbols

The API can return those top categories if the concerned asset any of the following second-level categories:

Top-Level Category (L1)Second-Level Category (L2)
ExplicitExplicit Nudity
Explicit Sexual Activity
Sex Toys
Non-Explicit Nudity of Intimate parts and KissingNon-explicit Nudity
Obstructed intimate parts
Kissing on the lips
Swimwear or UnderwearMale Swimwear or Underwear
Female Swimwear or Underwear
ViolenceGraphic Violence
Weapons
Visually DisturbingDeath and Emaciation
Crashes
Drugs & TobaccoProducts
Drug & Tobacco Paraphernalia & Use
AlcoholAlcohol Use
Alcoholic Beverages
Rude GesturesMiddle Finger
GamblingN/A
Hate SymbolsNazi Party
White Supremacy
Extremist