Subject replacement (Swap) video generation
Replace the subject in a video using a Mask and reference image to produce a Swap video.
POST
/openapi/v2/video/swap/generateBody Parametersapplication/json
img_id* integer
Image resource ID
keyframe_id* integer
From 1 to the last video frame. Defaults to 1 if not provided
mask_id* string
Mask ID
quality* string
Output quality tier
source_video_id integer
The video_id generated by Paiwo API must be passed in source_video_id or video_media_id
video_media_id integer
For videos uploaded through the interface media_id, source_video_id or video_media_id must be passed
Responses
200 application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties error* object
401 Missing or invalid API Key application/json
response-401 object
1{
2"img_id": 0,
3"keyframe_id": 1,
4"mask_id": "0",
5"quality": "360p",
6"source_video_id": 0
7}
1curl -X POST "https://api.digislash.com/openapi/v2/video/swap/generate" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"img_id": 0,
6"keyframe_id": 1,
7"mask_id": "0",
8"quality": "360p",
9"source_video_id": 0
10}'
1▼{
2"ErrCode": 0,
3"ErrMsg": "success",
4▼"RespData": {
5"id": 123456
6}
7}
