{
  "openapi": "3.0.1",
  "info": {
    "title": "Face Blur & Image Anonymizer (GDPR, No API Key)",
    "description": "Automatically detect and blur, pixelate or black out faces in photos, including large group and crowd shots. Optional license plate blurring. Returns the anonymized image plus face boxes and scores. Self-hosted AI, no external APIs.",
    "version": "1.0",
    "x-build-id": "hU7OLExHpdJtgIuIN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/freecamp008~face-blur-anonymizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-freecamp008-face-blur-anonymizer",
        "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/freecamp008~face-blur-anonymizer/runs": {
      "post": {
        "operationId": "runs-sync-freecamp008-face-blur-anonymizer",
        "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/freecamp008~face-blur-anonymizer/run-sync": {
      "post": {
        "operationId": "run-sync-freecamp008-face-blur-anonymizer",
        "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": "Direct links to images (JPEG, PNG, WebP, AVIF, GIF, TIFF). Each image becomes one result with a link to the anonymized copy and the detected face boxes.",
            "items": {
              "type": "string"
            }
          },
          "method": {
            "title": "Anonymization method",
            "enum": [
              "blur",
              "pixelate",
              "blackbox"
            ],
            "type": "string",
            "description": "<b>blur</b>: strong Gaussian blur. <b>pixelate</b>: mosaic blocks. <b>blackbox</b>: solid fill with the box color (irreversible, strongest).",
            "default": "blur"
          },
          "shape": {
            "title": "Face shape",
            "enum": [
              "ellipse",
              "rectangle"
            ],
            "type": "string",
            "description": "Cover faces with an <b>ellipse</b> (natural look) or a <b>rectangle</b> (covers more of the head). License plates are always rectangles.",
            "default": "ellipse"
          },
          "strength": {
            "title": "Blur / pixelation strength",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Higher = stronger blur or bigger mosaic blocks. The effect scales with the face size, so small and large faces are equally unreadable.",
            "default": 60
          },
          "boxColor": {
            "title": "Box color",
            "pattern": "^$|^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
            "type": "string",
            "description": "Fill color for the <b>blackbox</b> method, as a hex color like <code>#000000</code>.",
            "default": "#000000"
          },
          "paddingPercent": {
            "title": "Padding around faces (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Grow each detected face box by this percentage on every side before anonymizing (covers hair, ears and chin). Faces also get a little extra room at the top for the forehead.",
            "default": 20
          },
          "minConfidence": {
            "title": "Face confidence threshold",
            "minimum": 0.05,
            "maximum": 1,
            "type": "number",
            "description": "0.05-1. Faces scoring below this are ignored. Lower = catch more faces (also more false positives); higher = fewer mistakes. 0.6 is a good default for anonymization.",
            "default": 0.6
          },
          "detectionMode": {
            "title": "Detection mode",
            "enum": [
              "fast",
              "balanced",
              "thorough"
            ],
            "type": "string",
            "description": "<b>fast</b>: one pass over the whole image (portraits, few large faces). <b>balanced</b>: adds 1-2 higher-resolution passes in overlapping tiles (group photos). <b>thorough</b>: scans tiles up to full resolution (crowds, tiny faces in large photos; slower).",
            "default": "balanced"
          },
          "blurLicensePlates": {
            "title": "Also blur license plates (experimental)",
            "type": "boolean",
            "description": "Also detect and anonymize vehicle license plates. The plate model was trained mainly on Chinese plates: it works on many single-row plates worldwide but can miss long EU-style plates. Check results when it matters.",
            "default": false
          },
          "plateMinConfidence": {
            "title": "Plate confidence threshold",
            "minimum": 0.05,
            "maximum": 1,
            "type": "number",
            "description": "0.05-1. License plates scoring below this are ignored.",
            "default": 0.5
          },
          "detectOnly": {
            "title": "Detect only (no output image)",
            "type": "boolean",
            "description": "Only return face (and plate) boxes and counts, without creating an anonymized image. Useful for counting faces or for your own redaction pipeline.",
            "default": false
          },
          "savePreview": {
            "title": "Save detection preview",
            "type": "boolean",
            "description": "Also save a copy of the original image with the detected boxes and scores drawn on it (<code>previewUrl</code>). Handy for checking results.",
            "default": false
          },
          "includeLandmarks": {
            "title": "Include facial landmarks",
            "type": "boolean",
            "description": "Add 5 facial landmarks (eyes, nose tip, mouth corners) to each face in the output.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the anonymized image. All metadata (EXIF, GPS location, camera info) is removed from the output.",
            "default": "jpeg"
          },
          "outputQuality": {
            "title": "Output quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100, used for JPEG and WebP.",
            "default": 90
          },
          "maxSidePx": {
            "title": "Max image side (px)",
            "minimum": 256,
            "maximum": 8192,
            "type": "integer",
            "description": "Images larger than this on their longest side are downscaled first. Face boxes refer to the (possibly downscaled) output image.",
            "default": 4096
          },
          "returnBase64": {
            "title": "Return base64 (Standby API only)",
            "type": "boolean",
            "description": "Standby HTTP API only: also include the anonymized image as a base64 string (<code>imageBase64</code>) in the response.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}