{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Converter & Compressor: WebP, AVIF, HEIC",
    "description": "Bulk image optimizer and converter: compress PNG, JPG or HEIC to WebP or AVIF, set quality or a target size in KB, resize, strip EXIF and GPS. $0.003 per image, failed images free. Takes links, uploads or a dataset. Returns file links and percent saved. MCP-ready, no login.",
    "version": "0.0",
    "x-build-id": "6VGCBidDQJhZFdG2n"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/conserving_celerytop~image-converter-compressor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-conserving_celerytop-image-converter-compressor",
        "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/conserving_celerytop~image-converter-compressor/runs": {
      "post": {
        "operationId": "runs-sync-conserving_celerytop-image-converter-compressor",
        "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/conserving_celerytop~image-converter-compressor/run-sync": {
      "post": {
        "operationId": "run-sync-conserving_celerytop-image-converter-compressor",
        "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": "Image URLs",
            "type": "array",
            "description": "Enter direct links to image files, one per line: JPEG, PNG, WebP, AVIF, HEIC (iPhone photos), GIF, TIFF or BMP. Use your own photos, product shots, banners or screenshots.",
            "items": {
              "type": "string"
            }
          },
          "imageUploads": {
            "title": "Upload images",
            "type": "array",
            "description": "Upload image files from your computer. Each file is stored in a key-value store you choose and read from its link."
          },
          "imageBase64": {
            "title": "Image data (base64)",
            "type": "array",
            "description": "Paste images as base64 strings or data URIs (data:image/png;base64,...), one per line. Handy from Make, Zapier, n8n or your own code. Up to about 10 MB each.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with image links",
            "type": "string",
            "description": "Convert the images listed in a dataset, for example the output of a scraper. Pick a dataset or paste its ID. The links are added to \"Image URLs\"."
          },
          "datasetField": {
            "title": "Field with the image link",
            "type": "string",
            "description": "Name of the dataset field that holds each image link, for example \"imageUrl\" or \"url\". A field can hold one link or a list of links.",
            "default": "imageUrl"
          },
          "listFileUrl": {
            "title": "List file URL",
            "type": "string",
            "description": "Web address of a public .txt, .csv or .json file with image links, one per line. A .csv file uses its first column. A header row is skipped. Up to 10 MB. The links are added to \"Image URLs\"."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "same"
            ],
            "type": "string",
            "description": "Choose the format of the new files. WebP and AVIF give the smallest files for the web; JPEG works everywhere; PNG is lossless and keeps transparency.",
            "default": "webp"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Set the compression quality for WebP, AVIF and JPEG, from 1 (smallest file) to 100 (best image). 75 to 85 suits most web images.",
            "default": 80
          },
          "targetSizeKb": {
            "title": "Target size",
            "minimum": 5,
            "maximum": 20000,
            "type": "integer",
            "description": "Enter the largest file size you want per image. Quality is lowered step by step until the file fits, then the image is made smaller if needed. WebP, AVIF and JPEG only."
          },
          "maxWidth": {
            "title": "Maximum width",
            "minimum": 16,
            "maximum": 16384,
            "type": "integer",
            "description": "Shrink wider images to this width, keeping the aspect ratio. Smaller images keep their size."
          },
          "maxHeight": {
            "title": "Maximum height",
            "minimum": 16,
            "maximum": 16384,
            "type": "integer",
            "description": "Shrink taller images to this height, keeping the aspect ratio. Smaller images keep their size."
          },
          "resizeMode": {
            "title": "Resize mode",
            "enum": [
              "fit",
              "cover",
              "stretch"
            ],
            "type": "string",
            "description": "How Maximum width and Maximum height are used. Fill and Stretch need both and give images of exactly that size, also enlarging small ones. Animated images always use Fit inside.",
            "default": "fit"
          },
          "keepMetadata": {
            "title": "Keep metadata",
            "type": "boolean",
            "description": "Keep EXIF and XMP data (camera, date, GPS, copyright) in the new files. Off gives smaller files and removes location data. The color profile is always kept.",
            "default": false
          },
          "autoRotate": {
            "title": "Rotate upright",
            "type": "boolean",
            "description": "Turn photos upright using the camera's orientation tag, so they display the same everywhere.",
            "default": true
          },
          "lossless": {
            "title": "Lossless WebP and AVIF",
            "type": "boolean",
            "description": "Save WebP without any quality loss (AVIF at top quality). Files are larger than lossy ones but usually smaller than PNG.",
            "default": false
          },
          "backgroundColor": {
            "title": "Background color",
            "type": "string",
            "description": "Enter the color that fills transparent areas when saving JPEG, as a hex code.",
            "default": "#ffffff"
          },
          "keepAnimation": {
            "title": "Keep animation",
            "type": "boolean",
            "description": "Keep all frames of animated GIF, WebP, PNG and AVIF files when the output is WebP, AVIF or PNG. JPEG output always takes the first frame.",
            "default": true
          },
          "returnBase64": {
            "title": "Return base64",
            "type": "boolean",
            "description": "Add each new file as a data URI in the dataset row (files up to 2 MB), for tools that cannot open links.",
            "default": false
          },
          "createZip": {
            "title": "Create a ZIP",
            "type": "boolean",
            "description": "Also pack all converted files of the run into one ZIP, saved in the key-value store as converted-images.zip. Skipped when the files add up to more than 300 MB.",
            "default": false
          },
          "maxImages": {
            "title": "Maximum images",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Convert at most this many images per run.",
            "default": 1000
          },
          "maxFileSizeMb": {
            "title": "Maximum file size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Download source files up to this size.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}