Start Composite Merge — Image Watermark - API
composite-merge transcoding job and burn a logo / image watermark onto the output. The image is fetched once before the merge starts. Same endpoint as Start Composite Merge — the only difference is the watermark body parameter is set to type: "image".HTTP method and endpoint
|
values: YOUR_TOKEN_WITHOUT_ANY_PREFIX
This will be a JWT token generate using VideoSDK ApiKey and Secret.
Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.
You can generate a new token by refering this Guide: Generate Auth token
values: application/json
This is usefull for json body parameters, so that VideoSDK servers can understand that the incoming body parameter will be a JSON string.
recordingIds to merge. Must be a non-empty array of unique IDs that belong to the requesting user. composite-merge-started, composite-merge-completed, composite-merge-failed and composite-merge-cancelled events. image for this variant. data:image/png;base64, prefix). PNG / JPG. defaultValue: bottom-right
Allowed: top-left | top-right | bottom-left | bottom-right | center.
defaultValue: 20
Pixels from the chosen edge (>= 0). Ignored when position is center.
defaultValue: 120
Logo width in pixels. Height auto-scales to preserve aspect ratio.
defaultValue: 1.0
0.0 (invisible) to 1.0 (fully opaque).
import fetch from 'node-fetch';
const options = {
method: "POST",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"recordingIds": [
"6697685c6eaaaac67ea18130",
"6697685c6eaaaac67ea18131"
],
"webhookUrl": "https://www.example.com/",
"watermark": {
"type": "image",
"image": "https://cdn.videosdk.live/branding/logo.png",
"imageConfig": {
"position": "bottom-right",
"margin": 20,
"width": 120,
"opacity": 1
}
}
}),
};
const url= `https://api.videosdk.live/v2/transcodings/merge`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
{
"id": "665fcf7f2abe9a2807e42700",
"recordingIds": [
"6697685c6eaaaac67ea18130",
"6697685c6eaaaac67ea18131"
],
"roomId": "abcd-efgh-ijkl",
"sessionId": "6847c231fbaa8b416bc87014",
"status": "processing",
"task": "composite-merge",
"startedAt": "2025-06-10T05:45:02.730Z"
}
Got a Question? Ask us on discord