{
  "openapi": "3.0.1",
  "info": {
    "title": "Watermark Image — Batch Text & Logo Overlays",
    "description": "Add text or logo watermarks to images in bulk with opacity, position, sizing, format, and downloadable output files.",
    "version": "1.0",
    "x-build-id": "9ULu3Z00AFLl87P4i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~watermark-image/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-watermark-image",
        "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/junipr~watermark-image/runs": {
      "post": {
        "operationId": "runs-sync-junipr-watermark-image",
        "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/junipr~watermark-image/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-watermark-image",
        "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",
        "required": [
          "images"
        ],
        "properties": {
          "images": {
            "title": "Images",
            "type": "array",
            "description": "List of images to watermark. Each object must have either a \"url\" (string) or \"kvStoreKey\" (string). Min: 1, Max: 1000.",
            "default": [
              {
                "url": "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png"
              }
            ]
          },
          "watermarkType": {
            "title": "Watermark Type",
            "enum": [
              "text",
              "image"
            ],
            "type": "string",
            "description": "Type of watermark: \"text\" overlays text, \"image\" composites a logo/image.",
            "default": "text"
          },
          "text": {
            "title": "Watermark Text",
            "type": "string",
            "description": "Text to overlay. Max 200 characters. Only used when watermarkType is \"text\".",
            "default": "CONFIDENTIAL"
          },
          "fontSize": {
            "title": "Font Size (px)",
            "minimum": 8,
            "maximum": 500,
            "type": "integer",
            "description": "Font size in pixels. Min: 8, Max: 500.",
            "default": 48
          },
          "fontColor": {
            "title": "Font Color",
            "type": "string",
            "description": "Font color as hex string (e.g. \"#FFFFFF\") or CSS color name.",
            "default": "#FFFFFF"
          },
          "fontFamily": {
            "title": "Font Family",
            "enum": [
              "sans-serif",
              "serif",
              "monospace"
            ],
            "type": "string",
            "description": "Font family: sans-serif, serif, or monospace.",
            "default": "sans-serif"
          },
          "customFontUrl": {
            "title": "Custom Font URL",
            "type": "string",
            "description": "URL to a TTF/OTF font file. Downloaded and used for text rendering. Falls back to fontFamily if invalid."
          },
          "fontWeight": {
            "title": "Font Weight",
            "enum": [
              "normal",
              "bold"
            ],
            "type": "string",
            "description": "Font weight: normal or bold.",
            "default": "bold"
          },
          "textStroke": {
            "title": "Text Stroke/Outline",
            "type": "boolean",
            "description": "Add a dark stroke/outline around text for readability on any background.",
            "default": true
          },
          "textStrokeColor": {
            "title": "Text Stroke Color",
            "type": "string",
            "description": "Stroke color as hex string (e.g. \"#000000\").",
            "default": "#000000"
          },
          "textStrokeWidth": {
            "title": "Text Stroke Width (px)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Stroke width in pixels. Min: 0, Max: 10.",
            "default": 2
          },
          "watermarkImageUrl": {
            "title": "Watermark Image URL",
            "type": "string",
            "description": "URL of the watermark image/logo. PNG with transparency recommended. Required when watermarkType is \"image\"."
          },
          "watermarkImageKvKey": {
            "title": "Watermark Image KV Store Key",
            "type": "string",
            "description": "KV Store key for watermark image (alternative to watermarkImageUrl)."
          },
          "watermarkScale": {
            "title": "Watermark Image Scale",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "Scale of watermark image relative to source image width. 0.1 = 10%, 1.0 = 100%. Min: 0.01, Max: 1.0.",
            "default": 0.2
          },
          "position": {
            "title": "Watermark Position",
            "enum": [
              "top-left",
              "top-center",
              "top-right",
              "center-left",
              "center",
              "center-right",
              "bottom-left",
              "bottom-center",
              "bottom-right"
            ],
            "type": "string",
            "description": "Where to place the watermark on the image.",
            "default": "bottom-right"
          },
          "opacity": {
            "title": "Opacity",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "Watermark opacity. 0.01 = nearly transparent, 1.0 = fully opaque. Min: 0.01, Max: 1.0.",
            "default": 0.5
          },
          "rotation": {
            "title": "Rotation (degrees)",
            "minimum": -360,
            "maximum": 360,
            "type": "integer",
            "description": "Rotation angle in degrees. Use -45 for diagonal watermarks. Min: -360, Max: 360.",
            "default": 0
          },
          "padding": {
            "title": "Padding (px)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Padding from image edges in pixels. Min: 0, Max: 500.",
            "default": 20
          },
          "tiled": {
            "title": "Tiled Watermark",
            "type": "boolean",
            "description": "Repeat watermark across entire image in a grid pattern. Overrides position.",
            "default": false
          },
          "tileSpacing": {
            "title": "Tile Spacing (px)",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Spacing between tiled watermarks in pixels. Min: 10, Max: 1000. Only used when tiled is true.",
            "default": 100
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "Output image format: png, jpeg, or webp.",
            "default": "png"
          },
          "outputQuality": {
            "title": "Output Quality (JPEG/WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Output quality for JPEG/WebP output. 1–100. Ignored for PNG.",
            "default": 90
          },
          "outputPrefix": {
            "title": "Output Filename Prefix",
            "type": "string",
            "description": "Prefix for output filenames in KV Store.",
            "default": "watermarked_"
          },
          "maxOutputWidth": {
            "title": "Max Output Width (px)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum output width in pixels. Images larger than this are resized (aspect ratio preserved). Leave empty for no resize."
          },
          "maxOutputHeight": {
            "title": "Max Output Height (px)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum output height in pixels. Leave empty for no resize."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum concurrent image processing operations. Min: 1, Max: 20.",
            "default": 1
          },
          "imageTimeout": {
            "title": "Image Download Timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Timeout for downloading each source image in milliseconds. Min: 5000, Max: 120000.",
            "default": 30000
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}