Watermark operation

Add a watermark to video or images — the API for logo and text overlays.

Overlay a logo image or text on any video or image with a single POST. Set position, opacity, and scale right in the request; a fotovid-hosted file comes back ready to serve.

curl -X POST https://api.fotovid.co/v1/video/watermark \
  -H "Authorization: Bearer p6_YOUR_KEY_ID:YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "source_url": "https://cdn.yoursite.com/clip.mp4",
    "params": {
      "type": "image",
      "watermark_image_url": "https://cdn.yoursite.com/logo.png",
      "position": "bottom-right",
      "opacity": 0.7,
      "scale": 0.2
    }
  }'

Why watermarking on serverless is painful

Watermarking looks trivial until you try to run it inside a serverless function. ffmpeg's overlay filter needs the full binary plus your logo staged on a writable disk, then it decodes and re-encodes the whole file — which routinely blows past Lambda and Vercel execution limits and memory caps for anything longer than a short clip. You end up managing layer bundles, temp storage, and cold starts just to stamp a logo in a corner.

  • The ffmpeg binary and libraries balloon your deploy far past typical serverless size limits
  • Re-encoding a full-length video overflows function timeouts and memory
  • Overlaying an image means fetching, staging, and cleaning up files on ephemeral disk
  • Getting position, opacity, and scale pixel-perfect across resolutions is fiddly filter-graph work

Request parameters

POST /v1/video/watermark & /v1/image/watermark

FieldTypeDefaultDescription
source_url*string (URL)HTTPS URL of the source video or image
params.type"image" | "text" | "combo""text"Watermark kind
params.watermark_image_urlstring (URL)Logo image URL (required for image/combo)
params.textstringOverlay text (required for text/combo)
params.positionstring"bottom-right"top-left · top-right · bottom-left · bottom-right · center
params.opacitynumber10–1
params.scalenumber0.15Watermark width relative to the source (0–1)
How it works

Your first call in three steps

  1. 1
    Get a free API key

    Sign up and create a key. You authenticate every request with an Authorization: Bearer p6_<key_id>:<secret> header. No card required to start — usage runs on credits ($1 = 100 credits, and a watermark is 1 credit).

  2. 2
    POST your source and watermark params

    Call POST /v1/video/watermark or POST /v1/image/watermark with the standard envelope: a source_url pointing at your input (an https URL), plus a params object. Set type to image, text, or combo, then pass watermark_image_url and/or text, along with position (top-left, top-right, bottom-left, bottom-right, or center), opacity (0–1), scale (0–1, default 0.15), and padding. Fotovid downloads the input, overlays the mark, and returns synchronously.

  3. 3
    Store the returned result URL

    The response is flat JSON with an id, type, and a fotovid-hosted url for the watermarked file (video responses also include duration). Download it and store your own copy — treat the hosted URL as a handoff, not permanent storage, since it expires.

Frequently asked questions

Ship it with one API call

Grab a free key and make your first call in under five minutes.