POST
/
v1
/
validate
/
nsfw
import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.validate.nsfw({
  "url": "https://images.unsplash.com/photo-1633998979521-11ca9d0e6e38?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
})
{
  "success": true,
  "nsfw": false,
  "nudity": false,
  "gore": false,
  "nudity_score": 0.08966293931007385,
  "nsfw_score": 0.04566227982286364,
  "gore_score": 0.0016616203356534243,
  "_usage": {
        "input_tokens": 45,
        "output_tokens": 40,
        "inference_time_tokens": 972,
        "total_tokens": 1057
  }
}

Params

url
string
required

The image URL to validate.

x-api-key
string
required

Your JigsawStack API key

Response

success
boolean

Indicates whether the call was successful.

message
string

The message returned by the API.

import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.validate.nsfw({
  "url": "https://images.unsplash.com/photo-1633998979521-11ca9d0e6e38?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
})
{
  "success": true,
  "nsfw": false,
  "nudity": false,
  "gore": false,
  "nudity_score": 0.08966293931007385,
  "nsfw_score": 0.04566227982286364,
  "gore_score": 0.0016616203356534243,
  "_usage": {
        "input_tokens": 45,
        "output_tokens": 40,
        "inference_time_tokens": 972,
        "total_tokens": 1057
  }
}