{
  "openapi": "3.0.1",
  "info": {
    "title": "Batch Image Processor: Resize, Convert, Watermark",
    "description": "Batch image processor: resize, crop, convert (JPG, PNG, WebP), watermark, remove all metadata except the ICC colour profile, including EXIF location, with contact sheet, from links or stored files. One status row per image, failures free. From USD 0.0015 per image. Platform run 28.11: 1 item, 3.3 s.",
    "version": "0.1",
    "x-build-id": "E8ERdwrSKWL6U4NfK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bardach_technologies~batch-image-processing-toolkit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bardach_technologies-batch-image-processing-toolkit",
        "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/bardach_technologies~batch-image-processing-toolkit/runs": {
      "post": {
        "operationId": "runs-sync-bardach_technologies-batch-image-processing-toolkit",
        "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/bardach_technologies~batch-image-processing-toolkit/run-sync": {
      "post": {
        "operationId": "run-sync-bardach_technologies-batch-image-processing-toolkit",
        "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",
        "properties": {
          "imageUrls": {
            "title": "Batch image processor: image links",
            "maxItems": 500,
            "type": "array",
            "description": "Links to the images the batch image processor should handle: direct links to JPG, PNG, WebP, GIF, BMP or TIFF images, one per line, up to 500 together with the uploaded files, each at most 2,000 characters and 30 MB. Only http and https; private, local and cloud-metadata addresses are refused, also after redirects. A link may be delivered from another host after a redirect; the target address is not shown. A host that answers 401, 403, 407, 429 or 451, or with a challenge page, is not asked again in this run (free rows). A row never shows the link: its input field holds the fixed text (link not shown; match by position), so match rows to your list by position. You must hold the rights to every image you give and to the results. Default: empty.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "fileKeys": {
            "title": "Batch image processor: uploaded images (keys in a key-value store)",
            "maxItems": 200,
            "type": "array",
            "description": "Images for the batch image processor that you uploaded yourself: keys of image files in a key-value store you own, one per line, up to 200, at most 30 MB each. Pick the store below; empty means this run's own store. Keys starting with out- or contact-sheet and the Actor's own records are refused. Default: empty.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Key-value store with your files",
            "type": "string",
            "description": "The key-value store that holds the files named in Batch image processor: uploaded images and the watermark logo. Leave empty to read from this run's own default store. Results are always written to this run's own store, not to this one."
          },
          "sampleImage": {
            "title": "Include the built-in sample picture",
            "type": "boolean",
            "description": "Adds one picture drawn by the Actor (1600 x 1200, no photograph) whose EXIF block holds a made-up GPS position, so a first run shows the location being removed. It needs no website and no file. Default: off.",
            "default": false
          },
          "autoOrient": {
            "title": "Turn pictures upright (EXIF orientation)",
            "type": "boolean",
            "description": "Rotates or mirrors the pixels as the camera's orientation tag says, before any other step, so the result looks right without the tag. Default: on.",
            "default": true
          },
          "trimBorders": {
            "title": "Trim uniform borders",
            "type": "boolean",
            "description": "Cuts away a border of one colour (the colour of the top-left pixel, or a fully transparent border) before cropping and resizing. Nothing is cut when the whole picture is one colour. Default: off.",
            "default": false
          },
          "trimTolerance": {
            "title": "Trim tolerance",
            "minimum": 0,
            "maximum": 64,
            "type": "integer",
            "description": "How far a pixel may differ from the border colour and still count as border, from 0 (exact) to 64, on a 0 to 255 scale. Only used with Trim uniform borders. Default: 10.",
            "default": 10
          },
          "cropAspectRatio": {
            "title": "Crop to aspect ratio",
            "type": "string",
            "description": "Cuts the picture to this ratio, written width:height such as 1:1, 4:5 or 16:9, without scaling it. The cut is placed by Crop position. Empty means no ratio crop. Default: empty."
          },
          "cropGravity": {
            "title": "Crop position",
            "enum": [
              "center",
              "top",
              "bottom",
              "left",
              "right"
            ],
            "type": "string",
            "description": "Where the kept part sits when the ratio crop or the Fill resize mode has to cut something away: center, top, bottom, left or right. Default: center.",
            "default": "center"
          },
          "resizeMode": {
            "title": "Resize mode",
            "enum": [
              "none",
              "fit",
              "fill",
              "exact"
            ],
            "type": "string",
            "description": "none keeps the size; fit makes the picture fit inside the width and height (either may be left empty) keeping its ratio; fill covers the box exactly and cuts the overflow; exact stretches to the box. Default: none.",
            "default": "none"
          },
          "width": {
            "title": "Width (px)",
            "minimum": 16,
            "maximum": 8000,
            "type": "integer",
            "description": "Target width in pixels, from 16 to 8000. Needed for fill and exact; fit needs a width, a height or both. Pictures are not enlarged unless Allow enlarging is on. Default: not set."
          },
          "height": {
            "title": "Height (px)",
            "minimum": 16,
            "maximum": 8000,
            "type": "integer",
            "description": "Target height in pixels, from 16 to 8000. Needed for fill and exact; fit needs a width, a height or both. Pictures are not enlarged unless Allow enlarging is on. Default: not set."
          },
          "allowUpscale": {
            "title": "Allow enlarging",
            "type": "boolean",
            "description": "When off, a picture smaller than the box is kept at its own size (fill and exact shrink the box to the same ratio instead). When on, pictures are scaled up with the same filter. Default: off.",
            "default": false
          },
          "padToBox": {
            "title": "Pad to the exact box (fit only)",
            "type": "boolean",
            "description": "With Fit and both width and height set, puts the resized picture in the middle of a canvas of exactly width x height in the background colour. Transparent formats keep an opaque canvas. Default: off.",
            "default": false
          },
          "backgroundColor": {
            "title": "Background colour",
            "type": "string",
            "description": "Colour like #ffffff used behind transparency when the result is a JPG, for padding and for the contact sheet. Three or six hex digits. Default: #ffffff.",
            "default": "#ffffff"
          },
          "watermarkText": {
            "title": "Watermark text",
            "maxLength": 120,
            "type": "string",
            "description": "One line of text, at most 120 characters, drawn in white with a dark outline on every picture, in the bundled Latin font. Letters missing from that font show as boxes. Empty means no text. Ignored when a logo key is set. Default: empty."
          },
          "watermarkLogoKey": {
            "title": "Watermark logo (key in your store)",
            "type": "string",
            "description": "Key of a logo image (JPG, PNG or WebP, at most 5 MB and 4 megapixels) in the key-value store above; a PNG with transparency works best. It replaces the text. If it cannot be read the run stops before anything is processed or charged. Default: empty."
          },
          "watermarkPosition": {
            "title": "Watermark position",
            "enum": [
              "bottom-right",
              "bottom-left",
              "top-right",
              "top-left",
              "center"
            ],
            "type": "string",
            "description": "Corner or centre where the text or logo is placed, with a small margin. Default: bottom-right.",
            "default": "bottom-right"
          },
          "watermarkOpacity": {
            "title": "Watermark opacity (%)",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "How opaque the watermark is, from 5 to 100 percent. Default: 40.",
            "default": 40
          },
          "watermarkSizePercent": {
            "title": "Watermark size (% of width)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Width of the watermark as a percentage of the picture's width, from 5 to 60. Default: 20.",
            "default": 20
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "keep",
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "keep writes JPG as JPG, PNG as PNG and WebP as WebP (GIF, BMP and TIFF become PNG); or choose jpg, png or webp for every picture. Default: keep.",
            "default": "keep"
          },
          "quality": {
            "title": "Quality (JPG and WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Encoder quality from 1 to 100 for JPG and WebP results; PNG is always lossless. Default: 85.",
            "default": 85
          },
          "contactSheet": {
            "title": "Batch image processor: make a contact sheet",
            "type": "boolean",
            "description": "Adds one last row and one JPG sheet (contact-sheet.jpg) with thumbnails of the delivered results, up to 100 tiles. It is charged only when it is made. Default: off.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Tiles per row on the contact sheet, from 1 to 12. Default: 5.",
            "default": 5
          },
          "contactSheetThumbnailPx": {
            "title": "Contact sheet thumbnail size (px)",
            "minimum": 64,
            "maximum": 400,
            "type": "integer",
            "description": "Longest side of each tile in pixels, from 64 to 400. Default: 160.",
            "default": 160
          },
          "contactSheetLabels": {
            "title": "Contact sheet labels",
            "type": "boolean",
            "description": "Writes a short name (the file name of an uploaded file, or link <position> for a link) under each tile of the contact sheet. Default: on.",
            "default": true
          },
          "maxOutputMegapixels": {
            "title": "Largest result allowed (megapixels)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Pictures whose planned result is larger than this get a free outputTooLarge row and are not processed, so a wrong size cannot create a huge file. From 0.1 to 100. Default: 25.",
            "default": 25
          },
          "maxAttempts": {
            "title": "Download tries",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How often a link is tried when the host answers with a temporary error (408, 425 or 5xx) or the transfer breaks, from 1 to 5, with growing pauses, all within one time limit of 300 s per link. 401, 403, 407, 429 and 451 are never retried: they stop that host for the run. Default: 3.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}