{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Converter & Compressor - WebP, AVIF, JPG, PNG in Bulk",
    "description": "Convert, compress and resize image links in bulk: WebP, AVIF, JPG, PNG. Strips EXIF and GPS data by default. Results are files in the run's key-value store with public links.",
    "version": "0.1",
    "x-build-id": "nLKKDo6JeytMVXP8a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/northbell~image-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-northbell-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/northbell~image-converter/runs": {
      "post": {
        "operationId": "runs-sync-northbell-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/northbell~image-converter/run-sync": {
      "post": {
        "operationId": "run-sync-northbell-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": {
          "imageUrls": {
            "title": "Image links",
            "type": "array",
            "description": "Direct links to image files (JPEG, PNG, WebP, AVIF, GIF, TIFF). Or leave empty and give a Dataset ID. HEIC/HEIF photos and SVG files come back as errors, free.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset ID",
            "type": "string",
            "description": "Read image links from this Apify dataset (e.g. the dataset of a scraper run). Use {{resource.defaultDatasetId}} when you connect this Actor as an integration after another Actor."
          },
          "urlField": {
            "title": "Link field in the dataset",
            "type": "string",
            "description": "Name of the field that holds the image link. A dotted path works (media.image). The field may hold one link or a list of links, for example images; every link is converted.",
            "default": "url"
          },
          "onlyNewImages": {
            "title": "Only new images",
            "type": "boolean",
            "description": "Skip links this Actor already converted with the same output settings in an earlier run (kept in a key-value store named image-converter-seen in your account). Use it for scheduled runs. Skipped images are free.",
            "default": false
          },
          "format": {
            "title": "Output format",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "keep"
            ],
            "type": "string",
            "description": "keep writes JPEG, PNG, WebP or GIF as the same format (an AVIF stays AVIF).",
            "default": "webp"
          },
          "quality": {
            "title": "Quality (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "WebP, AVIF and JPEG. For PNG it sets the colour palette quality unless Lossless is on.",
            "default": 80
          },
          "lossless": {
            "title": "Lossless",
            "type": "boolean",
            "description": "WebP and PNG only: keep every pixel exactly. Files are larger. Ignores Quality (and the target size).",
            "default": false
          },
          "targetKb": {
            "title": "Target size (KB)",
            "type": "number",
            "description": "Optional. Searches for the highest quality that gives a file at or under this size, in at most 6 tries. Each row says whether the target was reached; if not, you get the smallest file found. Does not resize."
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Scales the image down to fit. Empty keeps the width."
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Scales the image down to fit. Empty keeps the height."
          },
          "fit": {
            "title": "Resize mode",
            "enum": [
              "inside",
              "cover",
              "contain"
            ],
            "type": "string",
            "description": "How the image meets the maximum width and height. Cover and contain make the picture exactly width x height when both are set.",
            "default": "inside"
          },
          "withoutEnlargement": {
            "title": "Never enlarge",
            "type": "boolean",
            "description": "Do not scale a small image up to the maximum width or height.",
            "default": true
          },
          "keepMetadata": {
            "title": "Keep metadata",
            "type": "boolean",
            "description": "Off by default: EXIF, GPS location and camera data are removed (the picture is still turned upright by its orientation). Turn on to keep them.",
            "default": false
          },
          "maxItems": {
            "title": "Max images per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on images per run, counting the links above and the dataset together (images skipped by Only new images do not count). Images over the cap are left for the next run.",
            "default": 500
          },
          "maxFileMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger inputs, and results larger than this, come back as errors, free. Hard cap 200.",
            "default": 50
          },
          "concurrency": {
            "title": "Images at the same time",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many images are downloaded and converted in parallel (1 to 8).",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}