Video Piper APIv1 Home OpenAPI spec

Docs › Image overlays

Image overlays: logos, watermarks and lower thirds

Draw up to four images of your own over a video: a logo in a corner, a faint watermark across the picture, a lower third with a speaker's name. Each has a place, a size, a time window, an opacity and fades, and later images are drawn on top of earlier ones. Send overlays when you create the video, next to fileName and sizeBytes for an upload, or next to edit for an edit; then upload each image like a part of the video. On every plan, in test mode too.

Overlay fieldDescription
fileName, sizeBytesRequired: the image you'll upload next (name 1–200 characters; size up to 10,485,760 bytes, 10 MB). A still PNG (transparency kept), JPEG or WebP, each side up to 4,096 pixels.
position, marginWhere it sits: top-left, top, top-right, left, center, right, bottom-left, bottom or bottom-right (the default), with a gap of margin (0–0.25 of the frame's shorter side; default 0.03) to the edges it's placed against.
x, yInstead of a position: the image's top-left corner, as fractions of the frame (0 to below 1). Give both. Anything past the right or bottom edge is cut off.
w or hThe image's width as a fraction of the frame's width (default 0.15), or its height as a fraction of the frame's height; the other side follows the image's shape. Never larger than the frame.
start, endSeconds on the video's timeline (after a trim; an edit's own timeline). Default: the whole video; end at least 0.1 s after start, null to the end.
opacityAbove 0 to 1 (default 1); 0.3 makes a faint watermark.
fadeIn, fadeOutSeconds of fade at each end of its time window, 0–10. With end: null the fade-out ends where the video ends.
// A corner logo on an upload
POST /videos
{ "fileName": "lesson-1.mp4", "sizeBytes": 734003200,
  "overlays": [ { "fileName": "logo.png", "sizeBytes": 18000, "position": "top-right", "w": 0.12, "opacity": 0.8 } ] }

201 Created
{ "videoId": "3f1c…", "partSize": 67108864, "partCount": 11, "status": "UPLOADING", "statusPath": "/videos/3f1c…",
  "overlays": [ { "file": "overlays[0]", "fileName": "logo.png", "partSize": 67108864, "partCount": 1 } ] }

POST /videos/3f1c…/parts
{ "file": "overlays[0]", "partNumbers": [1] }
→ PUT the bytes of logo.png to the url (no Authorization header), upload the video's own parts, then complete as usual

// A lower third that fades in and out, on an edit (from 0:02 to 0:08 of the edit)
POST /videos
{ "edit": { "clips": [ { "videoId": "INTERVIEW…", "start": 12 } ] },
  "overlays": [ { "fileName": "name-band.png", "sizeBytes": 90000, "x": 0.05, "y": 0.78, "w": 0.5,
                  "start": 2, "end": 8, "fadeIn": 0.5, "fadeOut": 0.5 } ] }
→ 201 UPLOADING with the same overlays list; upload overlays[0], then POST /videos/9a8b…/complete with {}
  • Uploading the images: the create answer lists each image as overlays[0], overlays[1]… with its part count (always one part). Request its URL with that name as file in the parts request and PUT it like any part. complete pins every image (409 UPLOAD_INCOMPLETE while one is missing); an edit with overlays stays UPLOADING until you call complete with an empty body. abort discards the images too. ?dryRun=true answers each image's settings as they will apply, with its part count, and opens nothing.
  • How it's drawn: on the final frame at the top quality level (for screen + camera, the combined picture), so every quality level, the MP4 and the HLS stream show it. It's drawn before redactions and the test mark: a redaction still hides whatever is under it, so a logo can never uncover something you blurred. On an upload it's drawn during the normal encode, with no extra pass (the video is always encoded, never copied as it was uploaded).
  • Times: an overlay that starts after an upload ends is simply not shown; on an edit, a start at or after the edit's end is a 400.
  • Status echoes overlays (each image's settings, never where the file is stored). A reprocess keeps them: the same images and settings, nothing to upload again (a reprocess can't change or remove them). The images are deleted with the last video that uses them.
  • Refused up front (400, with the field in details): more than 4 images, an image over 10 MB, a position and x/y together, w and h together, a value out of range. An image that isn't a still PNG, JPEG or WebP (an animated PNG, a video) or is over 4,096 pixels a side can only be seen when it's read, and ends the video FAILED.
  • Not with recordings streamed while they're made (streaming), URL imports, upload tokens (403 UPLOAD_TOKEN_SCOPE), edit tokens (403 EDIT_TOKEN_SCOPE) or the MCP server (it can't send files). To brand one of those videos, make an edit of it with overlays from your server once it has finished.