Documentation

Watermarking

Add text, image, or combined watermarks to images and video — every parameter, with defaults and validation.

Fotovid watermarks both images and video with the same request shape and the same parameters. They differ only in the endpoint and the media limits.

EndpointTask typeOutput
ImagePOST /v1/image/watermarkimage.watermarkWatermarked image
VideoPOST /v1/video/watermarkvideo.watermarkWatermarked MP4 (+ cover image)

Synchronous calls take { source_url, params } (the type comes from the URL). The async form adds a top-level type.

Two different type keys, don't mix them up: the top-level type is the task type (image.watermark / video.watermark), while params.watermark_type is the watermark variant (text / image / combo).

Watermark variants

  • text — render text over the media. Requires text.
  • image — overlay a logo from watermark_image_url. Requires watermark_image_url.
  • combo — logo and text together. Requires both.

Parameters

All parameters go inside params.

ParameterTypeDefaultApplies toNotes
watermark_typestringtextalltext | image | combo.
textstringtext, comboRequired for text & combo. Max 1000 chars.
watermark_image_urlstring (URL)image, comboRequired for image & combo. image/*, ≤ 32 MiB.
positionstringbottom-rightalltop-left | top-right | bottom-left | bottom-right | center.
opacitynumber1all>01.
font_sizeint24text, combo8200 (px).
font_colorstringwhitetext, comboLetters-only name, or #RRGGBB / #RRGGBBAA (alpha).
scalenumber0.15image, comboLogo width = source width × scale. >01.
paddingint16allInset from the edge, 0500 (px).
presetstringx264 defaultvideolibx264 speed/size preset (ultrafastveryslow).
output_formatstringwebpimage outputwebp | jpeg | png.
qualityint80image output1100. Ignored for png.

On video, output_format and quality affect only the generated cover image — the video itself is always MP4. Use preset to trade encode speed against file size for the video.

Output format

  • webp (default) — lossy, keeps transparency.
  • jpeg — lossy, flattens transparency to black.
  • png — lossless, keeps transparency; quality is ignored.

Examples

Text watermark (image, minimal — only text is required):

{
  "source_url": "https://cdn.example.com/photo.jpg",
  "params": {
    "watermark_type": "text",
    "text": "Fotovid.co",
    "position": "bottom-right",
    "font_size": 28,
    "font_color": "white",
    "opacity": 0.9
  }
}

Logo watermark (image):

{
  "source_url": "https://cdn.example.com/photo.jpg",
  "params": {
    "watermark_type": "image",
    "watermark_image_url": "https://cdn.example.com/logo.png",
    "scale": 0.15,
    "position": "top-right",
    "opacity": 0.8,
    "output_format": "png"
  }
}

Combo (logo + text) on video, submitted as an async task:

{
  "type": "video.watermark",
  "source_url": "https://cdn.example.com/clip.mp4",
  "params": {
    "watermark_type": "combo",
    "watermark_image_url": "https://cdn.example.com/logo.png",
    "text": "Fotovid.co",
    "position": "bottom-right",
    "preset": "veryfast"
  }
}

Validation

Bad parameters return 400 with a message naming the field — e.g. opacity is out of range, invalid position: <value>, or text is required for watermark type text. See Errors for the response shape.

Video watermarking is gated by both resolution and duration. The synchronous endpoint handles video up to 720p and 15 seconds; anything larger or longer returns a 409 — submit it as an async task (up to 4K). Sources above 4K are not supported on either path.