{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Watermark, Resize & Convert to WebP/AVIF",
    "description": "Bulk watermark, resize and convert product images: text or logo watermark (9 positions or tiled), Amazon/Shopify/Instagram/OG presets, pad or crop, WebP, AVIF, JPG, PNG, metadata stripped. URLs or Google Sheet in, download links out.",
    "version": "1.0",
    "x-build-id": "UJxUQuHwkPYsdioCK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fast_data_asap~bulk-image-watermark-resize/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fast_data_asap-bulk-image-watermark-resize",
        "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/fast_data_asap~bulk-image-watermark-resize/runs": {
      "post": {
        "operationId": "runs-sync-fast_data_asap-bulk-image-watermark-resize",
        "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/fast_data_asap~bulk-image-watermark-resize/run-sync": {
      "post": {
        "operationId": "run-sync-fast_data_asap-bulk-image-watermark-resize",
        "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": "Direct links to JPG, PNG, WebP, AVIF, GIF, TIFF or BMP images. The output file is named after the URL's file name.",
            "default": [
              "https://raw.githubusercontent.com/opencv/opencv/4.x/samples/data/fruits.jpg",
              "https://raw.githubusercontent.com/opencv/opencv/4.x/samples/data/baboon.jpg"
            ],
            "items": {
              "type": "string"
            }
          },
          "images": {
            "title": "Images with custom names (optional)",
            "type": "array",
            "description": "Optional list of {\"url\": \"...\", \"name\": \"SKU-123\"} objects, e.g. pasted from a spreadsheet. \"name\" becomes the output file name."
          },
          "sheetCsvUrl": {
            "title": "Google Sheet or CSV link (optional)",
            "type": "string",
            "description": "A Google Sheet shared as 'Anyone with the link can view' (or any CSV URL) with a 'url' column and an optional 'name' column (also accepted: image, link, sku, filename). Every row is processed."
          },
          "watermarkType": {
            "title": "Watermark",
            "enum": [
              "text",
              "logo",
              "none"
            ],
            "type": "string",
            "description": "Stamp a text or your logo onto every image, or no watermark.",
            "default": "text"
          },
          "text": {
            "title": "Watermark text",
            "type": "string",
            "description": "Used when Watermark = Text, e.g. © YourBrand.com. Use \\n for a second line.",
            "default": "© YourBrand.com"
          },
          "logoUrl": {
            "title": "Logo URL",
            "type": "string",
            "description": "Used when Watermark = Logo. Direct link to a PNG with transparent background (WebP/JPG also work)."
          },
          "position": {
            "title": "Position",
            "enum": [
              "top-left",
              "top-center",
              "top-right",
              "center-left",
              "center",
              "center-right",
              "bottom-left",
              "bottom-center",
              "bottom-right",
              "tile"
            ],
            "type": "string",
            "description": "Where the watermark goes. Tiled repeats it diagonally over the whole image (best protection against image theft).",
            "default": "bottom-right"
          },
          "opacity": {
            "title": "Opacity (0–1)",
            "minimum": 0.05,
            "maximum": 1,
            "type": "number",
            "description": "0.1 = barely visible, 1 = fully opaque.",
            "default": 0.6
          },
          "fontSize": {
            "title": "Font size (px)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Text size in output pixels. 0 = automatic (about 4.5% of the image size).",
            "default": 0
          },
          "textColor": {
            "title": "Text color",
            "type": "string",
            "description": "Hex code or color name, e.g. #FFFFFF, black, #FF6600. A thin contrasting outline keeps it readable on any background.",
            "default": "#FFFFFF"
          },
          "margin": {
            "title": "Margin (px)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Distance between the watermark and the image edge, in output pixels.",
            "default": 24
          },
          "logoScale": {
            "title": "Logo width (% of image width)",
            "minimum": 1,
            "maximum": 100,
            "type": "number",
            "description": "Logo is scaled to this share of the image width.",
            "default": 20
          },
          "resizePreset": {
            "title": "Resize preset",
            "enum": [
              "none",
              "square-1000",
              "square-2000",
              "amazon-2000",
              "shopify-2048",
              "instagram-1080",
              "og-1200x630",
              "custom"
            ],
            "type": "string",
            "description": "Target size. Fit decides how images with a different aspect ratio are handled.",
            "default": "square-1000"
          },
          "width": {
            "title": "Custom width (px)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Used with preset Custom. Leave one side empty to keep the aspect ratio."
          },
          "height": {
            "title": "Custom height (px)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Used with preset Custom."
          },
          "fit": {
            "title": "Fit",
            "enum": [
              "pad",
              "cover",
              "contain"
            ],
            "type": "string",
            "description": "How images with a different aspect ratio fit the target size. Pad keeps the whole product visible (marketplace standard).",
            "default": "pad"
          },
          "backgroundColor": {
            "title": "Background color (pad)",
            "type": "string",
            "description": "Padding color, e.g. #FFFFFF or transparent (transparent works with WebP, AVIF and PNG).",
            "default": "#FFFFFF"
          },
          "upscale": {
            "title": "Enlarge small images",
            "type": "boolean",
            "description": "Scale images smaller than the target size up to it. Off = small images keep their size (padded/centered when Fit = Pad).",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "webp",
              "avif",
              "jpg",
              "png"
            ],
            "type": "string",
            "description": "WebP is the best default for shops and websites; AVIF is 20–50% smaller still; JPG for marketplaces that need it (Amazon, eBay).",
            "default": "webp"
          },
          "quality": {
            "title": "Quality (1–100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For WebP, AVIF and JPG. 75–85 is visually lossless for product photos. WebP 100 = lossless.",
            "default": 82
          },
          "stripMetadata": {
            "title": "Strip metadata (EXIF, GPS, camera data)",
            "type": "boolean",
            "description": "Removes EXIF/XMP incl. GPS location. The color profile is kept so colors stay correct.",
            "default": true
          },
          "outputPrefix": {
            "title": "File name prefix",
            "type": "string",
            "description": "Optional prefix for every output file name, e.g. summer-sale → summer-sale-fruits.webp."
          },
          "maxFileSizeMb": {
            "title": "Max source file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger source images are skipped with status error (free).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}