{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Converter & Compressor: Bulk WebP, AVIF, Resize — Pixkiln",
    "description": "Bulk image converter, compressor and resizer: image URLs or a Picpail run in; WebP, AVIF, JPEG or PNG out, resized to fit, EXIF/GPS stripped, in one ZIP with bytes saved per image. Transparent PNG to JPEG on white, animated GIF to animated WebP. $1.50 per 1,000 images; failures free.",
    "version": "0.1",
    "x-build-id": "uOYoWF3VDCVwWvZjY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cybermax~image-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cybermax-image-converter",
        "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/cybermax~image-converter/runs": {
      "post": {
        "operationId": "runs-sync-cybermax-image-converter",
        "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/cybermax~image-converter/run-sync": {
      "post": {
        "operationId": "run-sync-cybermax-image-converter",
        "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 URLs",
            "type": "array",
            "description": "One image URL per line (JPEG, PNG, WebP, AVIF, GIF, TIFF, SVG). Or leave empty and give a dataset below.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or: images from an earlier run (dataset ID)",
            "type": "string",
            "description": "The dataset of a Picpail (Bulk Image Downloader) run in \"list\" mode, or any dataset with an imageUrl, url or src field. Download all images from a website with Picpail, then convert them here."
          },
          "format": {
            "title": "Convert to",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "original"
            ],
            "type": "string",
            "description": "WebP is the best all-rounder for websites (25-35% smaller than JPEG). AVIF is smaller still but slower to encode. \"Keep format\" only resizes and compresses.",
            "default": "webp"
          },
          "quality": {
            "title": "Quality (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "80 looks the same as the original to most people at a fraction of the size. 90+ for photography portfolios, 60-70 for thumbnails.",
            "default": 80
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 1,
            "maximum": 16000,
            "type": "integer",
            "description": "Shrink anything wider to this width, keeping the aspect ratio. Empty = keep the size. e.g. 1600 for web pages, 1200 for Shopify/WooCommerce product images, 400 for thumbnails."
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 1,
            "maximum": 16000,
            "type": "integer",
            "description": "Shrink anything taller to this height. Use with max width to fit a box."
          },
          "fit": {
            "title": "Fit",
            "enum": [
              "inside",
              "cover",
              "contain"
            ],
            "type": "string",
            "description": "With both width and height: \"inside\" keeps the whole image inside the box, \"cover\" crops to fill it exactly (square thumbnails), \"contain\" pads to the exact box.",
            "default": "inside"
          },
          "stripMetadata": {
            "title": "Strip metadata (EXIF, GPS, camera)",
            "type": "boolean",
            "description": "Removes location, camera and editing data (smaller files, more privacy). Orientation is applied first, so photos never come out sideways.",
            "default": true
          },
          "output": {
            "title": "Output",
            "enum": [
              "zip",
              "files",
              "both"
            ],
            "type": "string",
            "description": "One ZIP of all images, or each image as its own file with a direct link (good for feeding other tools), or both.",
            "default": "zip"
          },
          "neverLarger": {
            "title": "Never make a file bigger",
            "type": "boolean",
            "description": "If re-encoding an already optimised image in its own format would make it bigger, keep the original bytes.",
            "default": true
          },
          "allowEnlarge": {
            "title": "Allow enlarging small images",
            "type": "boolean",
            "description": "Off: images smaller than the max size are left at their size.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max source file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Bigger source files are skipped (free).",
            "default": 25
          },
          "maxImages": {
            "title": "Max images per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many images (the rest of the list is not downloaded or charged).",
            "default": 10000
          },
          "concurrency": {
            "title": "Images in parallel",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Lowered automatically to fit the run memory (4 at the default 1 GB; give the run 2 GB for 8).",
            "default": 4
          },
          "timeoutSecs": {
            "title": "Download timeout per image (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on one image's download after this long (free).",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}