{
  "openapi": "3.0.1",
  "info": {
    "title": "NSFW Image Detector & Image Tagger - Moderation + Categories",
    "description": "Check any image URL for nudity, sexual, violent, gory, hateful, drug, weapon and self-harm content, and get its category and tags in the same call. 14 scores, allow / review / block verdict with reasons, art and breastfeeding context, GIF frames, your own labels. No API key.",
    "version": "1.0",
    "x-build-id": "MEyG0qSEZvmltKtXT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pomlabs~image-moderation-tagger/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pomlabs-image-moderation-tagger",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/pomlabs~image-moderation-tagger/runs": {
      "post": {
        "operationId": "runs-sync-pomlabs-image-moderation-tagger",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/pomlabs~image-moderation-tagger/run-sync": {
      "post": {
        "operationId": "run-sync-pomlabs-image-moderation-tagger",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "imageUrls"
        ],
        "properties": {
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "One image per line: a public http(s) link to a JPEG, PNG, WebP, GIF, BMP or TIFF (up to 20 MB), or a data: URI with base64. Animated GIF and WebP files are checked on several frames.",
            "default": [
              "https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg",
              "https://upload.wikimedia.org/wikipedia/commons/0/05/Glass_of_beer.jpg",
              "https://www.gstatic.com/webp/gallery/1.webp"
            ],
            "items": {
              "type": "string"
            }
          },
          "tagging": {
            "title": "Category and tags",
            "type": "boolean",
            "description": "Also return the main category (people, food, product, nature...), up to 40 content tags and the kind of image (photo, illustration, anime, screenshot, meme, document). Same price.",
            "default": true
          },
          "customLabels": {
            "title": "Your own labels (optional)",
            "type": "array",
            "description": "Up to 10 plain-English descriptions to score from 0 to 1 on every image, for rules the standard categories do not cover. Examples: 'a person wearing a helmet', 'a product photo on a white background', 'contains a phone number or contact details'.",
            "items": {
              "type": "string"
            }
          },
          "blockThreshold": {
            "title": "Block threshold",
            "type": "string",
            "description": "Score from 0 to 1 at which a block category makes the verdict 'block'. Lower catches more and flags more safe images. Default 0.6.",
            "default": "0.6"
          },
          "reviewThreshold": {
            "title": "Review threshold",
            "type": "string",
            "description": "Score from 0 to 1 at which a block category that did not reach the block threshold makes the verdict 'review'. Default 0.35.",
            "default": "0.35"
          },
          "blockCategories": {
            "title": "Categories that block",
            "type": "array",
            "description": "Categories that set the verdict to 'block'. Any of: explicit, suggestive, violence, gore, weapons, drugs, hate, self_harm, harassment, illegal, political, deception, spam, medical.",
            "default": [
              "explicit",
              "violence",
              "gore",
              "hate",
              "self_harm"
            ],
            "items": {
              "type": "string"
            }
          },
          "reviewCategories": {
            "title": "Categories that ask for review",
            "type": "array",
            "description": "Categories that set the verdict to 'review' (never 'block') when they reach the block threshold.",
            "default": [
              "suggestive",
              "weapons",
              "drugs"
            ],
            "items": {
              "type": "string"
            }
          },
          "allowArtisticNudity": {
            "title": "Allow nudity in classical art",
            "type": "boolean",
            "description": "When on, nudity in paintings, frescoes and museum sculpture does not block or flag the image (the scores and nudityContext 'artistic' are still returned).",
            "default": false
          },
          "allowBreastfeeding": {
            "title": "Allow breastfeeding",
            "type": "boolean",
            "description": "When on, breastfeeding photos are not blocked or flagged for nudity.",
            "default": true
          },
          "maxFrames": {
            "title": "Frames checked in animated images",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "For animated GIF or WebP: how many frames, spread across the animation, are checked. The highest score of each category is returned. Still one charge per image.",
            "default": 3
          },
          "concurrency": {
            "title": "Images in parallel",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many images are processed at the same time. Lower it if your image host limits requests.",
            "default": 8
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}