{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Resizer: Resize, Crop, Convert & Compress",
    "description": "Resize, crop, pad, convert and compress images in bulk: several sizes per image, Amazon/Shopify/Etsy/Instagram/YouTube/favicon presets, max file size in KB, JPEG/PNG/WebP/AVIF output, HEIC input, smart crop, EXIF strip. Links, Drive, Dropbox, uploads; ZIP. Pay per image.",
    "version": "0.1",
    "x-build-id": "PASE1jYFOEuNfj7uz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bossless~bulk-image-resizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bossless-bulk-image-resizer",
        "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/bossless~bulk-image-resizer/runs": {
      "post": {
        "operationId": "runs-sync-bossless-bulk-image-resizer",
        "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/bossless~bulk-image-resizer/run-sync": {
      "post": {
        "operationId": "run-sync-bossless-bulk-image-resizer",
        "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": {
          "images": {
            "title": "Image links",
            "type": "array",
            "description": "Links to images: JPG, PNG, WebP, AVIF, HEIC/HEIF (iPhone photos), GIF (first frame), TIFF, BMP. Direct links, or Google Drive / Dropbox file links shared as 'Anyone with the link'. One link per line. Folders and pages that need a login don't work.",
            "items": {
              "type": "string"
            }
          },
          "uploads": {
            "title": "Or upload images",
            "type": "array",
            "description": "Upload image files from your computer. Apify keeps each file in a key-value store of your account and the actor reads it from there."
          },
          "datasetId": {
            "title": "Or: links from a dataset",
            "type": "string",
            "description": "ID of a dataset in your account (for example the output of a product, Instagram or Google Maps scraper). The links in the field below are read after the links above."
          },
          "datasetField": {
            "title": "Field with the links",
            "type": "string",
            "description": "Which field of each dataset item holds the image link: `imageUrl`, `displayUrl`, a nested `media.url`, or `images[*].url` for every item of a list.",
            "default": "url"
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "custom",
              "amazon",
              "shopify",
              "etsy",
              "ebay",
              "instagram-square",
              "instagram-portrait",
              "instagram-story",
              "youtube-thumbnail",
              "social-share",
              "web-responsive",
              "favicon"
            ],
            "type": "string",
            "description": "A ready-made size and format for a marketplace or social network. A preset replaces the sizes, fit, format, quality and background below; 'Strip metadata' and 'ZIP' still apply.",
            "default": "custom"
          },
          "sizes": {
            "title": "Output sizes",
            "type": "array",
            "description": "One output file per entry, for every image. Forms: `1200` (width), `x800` (height), `1200x630` (box, see Fit), `50%` (scale). Optional name and fit: `thumb=300x300:cover`. Each output file is one billed image.",
            "default": [
              "1200"
            ],
            "items": {
              "type": "string"
            }
          },
          "fit": {
            "title": "Fit (for WIDTHxHEIGHT sizes)",
            "enum": [
              "contain",
              "cover",
              "pad",
              "stretch"
            ],
            "type": "string",
            "description": "How a WIDTHxHEIGHT size is filled. A size's own `:fit` suffix wins over this.",
            "default": "contain"
          },
          "cropPosition": {
            "title": "Crop position (cover)",
            "enum": [
              "center",
              "smart",
              "top",
              "bottom",
              "left",
              "right"
            ],
            "type": "string",
            "description": "Which part of the picture a cover crop keeps.",
            "default": "center"
          },
          "backgroundColor": {
            "title": "Background colour",
            "type": "string",
            "description": "Fills the padding (fit 'pad') and replaces transparency in JPEG: `white`, `#ffffff`, `#f5f5f5`, or `transparent` (PNG, WebP, AVIF only).",
            "default": "#ffffff"
          },
          "allowUpscale": {
            "title": "Allow enlarging",
            "type": "boolean",
            "description": "Enlarge images smaller than the requested size. Off: a small image keeps its own size (pad still gives the exact box).",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "same",
              "jpeg",
              "png",
              "webp",
              "avif"
            ],
            "type": "string",
            "description": "File format of every output.",
            "default": "same"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG, WebP and AVIF quality (1-100). 75-85 is the usual web range.",
            "default": 82
          },
          "maxFileSizeKb": {
            "title": "Max file size (KB)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional. Each output is made to fit: quality is lowered first (not below 30), then the picture is made smaller. PNG is reduced to 256 colours first. The record says whether the target was met."
          },
          "stripMetadata": {
            "title": "Strip metadata",
            "type": "boolean",
            "description": "Remove EXIF (camera, GPS) and colour profiles; colours are converted to sRGB first so they look the same. Off: EXIF and the colour profile are kept. Images are always turned upright by their EXIF orientation.",
            "default": true
          },
          "createZip": {
            "title": "ZIP of all files",
            "type": "boolean",
            "description": "Also save every output file in one images.zip in the run's key-value store.",
            "default": true
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "At most this many input images are processed per run (after removing duplicate links).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}