🔞 NSFW

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 suggestive 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": [
            "suggestive"
        ],
        "status": "success"
    }
}

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

  • explicit_nudity
  • suggestive
  • violence
  • visually_disturbing
  • rude_gestures
  • drugs
  • tobacco
  • alcohol
  • gambling
  • hate_symbols

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

Top-Level CategorySecond-Level Category
Explicit NudityNudity
Graphic Male Nudity
Graphic Female Nudity
Sexual Activity
Illustrated Explicit Nudity
Adult Toys
SuggestiveFemale Swimwear Or Underwear
Male Swimwear Or Underwear
Partial Nudity
Barechested Male
Revealing Clothes
Sexual Situations
ViolenceGraphic Violence Or Gore
Physical Violence
Weapon Violence
Weapons
Self Injury
Visually DisturbingEmaciated Bodies
Corpses
Hanging
Air Crash
Explosions And Blasts
Rude GesturesMiddle Finger
DrugsDrug Products
Drug Use
Pills
Drug Paraphernalia
TobaccoTobacco Products
Smoking
AlcoholDrinking
Alcoholic Beverages
GamblingGambling
Hate SymbolsNazi Party
White Supremacy
Extremist