{
  "openapi": "3.0.1",
  "info": {
    "title": "Watermark Image API",
    "description": "Add text, logo, or tiled watermarks to image URLs, uploads, KV files, or data URLs. Save watermarked PNG, JPEG, or WebP files to Apify storage with clean dataset rows for API workflows.",
    "version": "0.0",
    "x-build-id": "WjWy4bUl6jGNIkjS3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~watermark-image-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-watermark-image-api",
        "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/maximedupre~watermark-image-api/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-watermark-image-api",
        "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/maximedupre~watermark-image-api/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-watermark-image-api",
        "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": {
          "imageFiles": {
            "title": "Images",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Upload image files or paste direct image URLs. Each item becomes one watermarked output image.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "base64Images": {
            "title": "Base64 images",
            "maxItems": 1000,
            "type": "array",
            "description": "Paste image data URLs for API workflows that already hold image bytes.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "watermarkText": {
            "title": "Watermark text",
            "maxLength": 200,
            "type": "string",
            "description": "Text to place on each image. Clear this field when you only want a logo."
          },
          "fontFamily": {
            "title": "Font family",
            "enum": [
              "sans-serif",
              "serif",
              "monospace",
              "arial",
              "impact",
              "verdana",
              "courier",
              "times-new-roman"
            ],
            "type": "string",
            "description": "Choose the base font for the text watermark.",
            "default": "sans-serif"
          },
          "customFontUrl": {
            "title": "Custom font URL",
            "type": "string",
            "description": "Optional URL to a TTF or OTF font file for the text watermark."
          },
          "fontColor": {
            "title": "Text color",
            "type": "string",
            "description": "Hex or CSS color for text, such as #FFFFFF.",
            "default": "#FFFFFF"
          },
          "fontWeight": {
            "title": "Font weight",
            "enum": [
              "normal",
              "bold"
            ],
            "type": "string",
            "description": "Choose normal or bold text.",
            "default": "bold"
          },
          "textSize": {
            "title": "Text size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Text size as a percent of image width.",
            "default": 12
          },
          "textStrokeWidth": {
            "title": "Text outline width",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Dark outline width in pixels for readability.",
            "default": 2
          },
          "textBackgroundOpacity": {
            "title": "Text background opacity",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Optional background box opacity behind text, from 0 to 100.",
            "default": 0
          },
          "logoFile": {
            "title": "Logo image",
            "type": "string",
            "description": "Upload a logo or paste a logo image URL. Transparent PNGs work well."
          },
          "logoScale": {
            "title": "Logo size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Logo size as a percent of image width.",
            "default": 20
          },
          "position": {
            "title": "Position",
            "enum": [
              "top-left",
              "top-center",
              "top-right",
              "center-left",
              "center",
              "center-right",
              "bottom-left",
              "bottom-center",
              "bottom-right"
            ],
            "type": "string",
            "description": "Where the watermark starts on each image.",
            "default": "bottom-right"
          },
          "opacity": {
            "title": "Opacity",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Watermark opacity from 1 to 100.",
            "default": 50
          },
          "rotation": {
            "title": "Rotation",
            "minimum": -360,
            "maximum": 360,
            "type": "integer",
            "description": "Rotation in degrees. Use -45 for a classic diagonal mark.",
            "default": 0
          },
          "padding": {
            "title": "Edge padding",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Distance from the selected edge in pixels.",
            "default": 20
          },
          "offsetXPercent": {
            "title": "Horizontal offset",
            "minimum": -100,
            "maximum": 100,
            "type": "integer",
            "description": "Move the watermark horizontally from the selected position, from -100 to 100 percent.",
            "default": 0
          },
          "offsetYPercent": {
            "title": "Vertical offset",
            "minimum": -100,
            "maximum": 100,
            "type": "integer",
            "description": "Move the watermark vertically from the selected position, from -100 to 100 percent.",
            "default": 0
          },
          "tiled": {
            "title": "Repeat across image",
            "type": "boolean",
            "description": "Repeat the watermark across the full image for proof or stock-photo previews.",
            "default": false
          },
          "tileSpacing": {
            "title": "Repeat spacing",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Space in pixels between repeated watermarks.",
            "default": 120
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "Image format for the watermarked files.",
            "default": "png"
          },
          "outputQuality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Quality for JPEG and WebP outputs.",
            "default": 90
          },
          "maxOutputWidth": {
            "title": "Maximum output width",
            "minimum": 1,
            "type": "integer",
            "description": "Resize wider images to this width while keeping aspect ratio."
          },
          "maxOutputHeight": {
            "title": "Maximum output height",
            "minimum": 1,
            "type": "integer",
            "description": "Resize taller images to this height while keeping aspect ratio."
          },
          "includeBase64Output": {
            "title": "Include base64 output",
            "type": "boolean",
            "description": "Also include small watermarked images as base64 strings for API workflows.",
            "default": false
          },
          "outputPrefix": {
            "title": "Output filename prefix",
            "type": "string",
            "description": "Prefix for watermarked file names in storage.",
            "default": "watermarked_"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}