{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Compressor & Converter: WebP, AVIF",
    "description": "$0.003 per image. Convert, compress and resize images in bulk to WebP, AVIF, JPEG or PNG. Links, uploads or base64 in. Set quality or a target size in KB, a maximum width and height, and strip metadata. Returns file links and percent saved. Failed images are free.",
    "version": "0.0",
    "x-build-id": "D20PuJK2fWskMXiFm"
  },
  "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, 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"
            }
          },
          "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."
          },
          "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
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}