API Examples

JigsawStack provides a flexible way to pass files to APIs. You can pass files through the following methods:

JSON

url
string
The image url or base64 encoded content.
file_store_key
string
The key used to store the image on Jigsawstack file Storage.

Multipart/form-data

file
file
The direct content of a file.

SDK Examples

Javascript

import { JigsawStack } from "jigsawstack";

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

const result = await jigsaw.validate.nsfw({
  url: "https://example.com/image.jpg",
});

Python

from jigsawstack import JigsawStack

jigsaw = JigsawStack(
    api_key="your-api-key",
)

result = jigsaw.validate.nsfw(
  {
    "url": "https://example.com/image.jpg"
  }
)