{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Converter & Compressor - WebP, AVIF, strip EXIF/GPS",
    "description": "Convert and compress images to WebP, AVIF, JPEG or PNG, resize them, and remove EXIF, GPS location, XMP and IPTC metadata. Reads images from your key-value store or uploaded files, applies the EXIF rotation first, and reports which metadata each image had.",
    "version": "0.1",
    "x-build-id": "Qq6uBoJHq3ENzzbjq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/quietworkslab~image-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-quietworkslab-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/quietworkslab~image-converter/runs": {
      "post": {
        "operationId": "runs-sync-quietworkslab-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/quietworkslab~image-converter/run-sync": {
      "post": {
        "operationId": "run-sync-quietworkslab-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": {
          "keyValueStoreId": {
            "title": "Key-value store",
            "type": "string",
            "description": "The key-value store in your account that holds the images. Every record that is an image is converted; JSON and text records are skipped. Leave it empty (with no uploads and no links) to try the Actor on built-in sample images (no image-processed events for them). When this Actor runs after another Actor from its Integrations tab, set it to {{resource.defaultKeyValueStoreId}}. Uploaded files that are in this store are converted with it, once."
          },
          "keyPrefix": {
            "title": "Only keys starting with",
            "type": "string",
            "description": "Optional. Convert only the records of the key-value store whose key starts with this text, for example product- or 2026-10-. Empty = all records; the value is saved encrypted, so Apify Console hides it after saving, and OUTPUT shows the prefix the run used."
          },
          "uploadedFiles": {
            "title": "Upload images",
            "type": "array",
            "description": "Optional. Upload image files here (JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 50 MB each). This field takes only files stored in your Apify account; put links to images on other websites into \"Image links\". If your account keeps its storages private (the default), the run names the store your uploads are in: choose that store in \"Key-value store\" and start again."
          },
          "imageUrls": {
            "title": "Image links",
            "type": "array",
            "description": "Optional. Direct links to image files (JPEG, PNG, WebP, GIF, AVIF or TIFF), not web pages; use only images you have the right to use. A run takes up to 1,000 links, read one at a time after the store and the uploads; a link that fails is not charged, and the README lists the limits. Leave empty (with no store and no uploads) to try the Actor on built-in sample images.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "original"
            ],
            "type": "string",
            "description": "Format of the converted images. WebP is small and works in all current browsers. AVIF is usually smaller still but slower to make (it counts double, see Pricing). Same as the original keeps the format and only compresses, resizes and removes metadata.",
            "default": "webp"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality from 1 (smallest file) to 100 (best quality) for WebP, AVIF and JPEG. 75 to 85 is a good balance. For PNG it is only used with \"Reduce PNG colors\".",
            "default": 80
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 1,
            "maximum": 16383,
            "type": "integer",
            "description": "Optional. Shrink images wider than this, keeping the aspect ratio, for example 1920. Images are never enlarged. Empty = keep the width."
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 1,
            "maximum": 16383,
            "type": "integer",
            "description": "Optional. Shrink images taller than this, keeping the aspect ratio, for example 1080. Images are never enlarged. Empty = keep the height."
          },
          "colorProfile": {
            "title": "Color profile (ICC)",
            "enum": [
              "srgb",
              "keep"
            ],
            "type": "string",
            "description": "Convert to sRGB turns the colors into standard sRGB and writes no profile, which is what browsers expect. Keep the original profile embeds the image's own ICC profile (for example Display P3 or Adobe RGB) for wide-gamut or print work; a profile can contain text such as its description and copyright, which then stays in the file.",
            "default": "srgb"
          },
          "keepMetadata": {
            "title": "Keep metadata (EXIF, GPS, XMP, IPTC)",
            "type": "boolean",
            "description": "Unchecked (default): all EXIF, GPS location, XMP, IPTC and comments are removed. Checked: EXIF (including the GPS location), XMP and IPTC are kept where the output format supports them, for example for a photo archive. The orientation is always applied to the pixels.",
            "default": false
          },
          "pngReduceColors": {
            "title": "Reduce PNG colors",
            "type": "boolean",
            "description": "For PNG output: reduce the image to at most 256 colors (lossy, often 50-80% smaller for screenshots, logos and graphics; not for photos). Quality controls how much the colors may change. It takes about twice the computing time, so it counts double (see Pricing). Unchecked = lossless PNG.",
            "default": false
          },
          "maxImages": {
            "title": "Maximum number of images",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Stop after this many images (converted or failed), for example to try the settings on 10 images first. Empty = no limit."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}