Docs Ali Pix /openapi/v2/video/mask/selection
API reference

Body replacement (Swap) Mask generation

Generate a subject-swap Mask for a given video frame for subsequent Swap generation.

POST/openapi/v2/video/mask/selection

Body Parametersapplication/json

keyframe_id integer

From 1 to the last video frame. Defaults to 1 if not provided

source_video_id integer

The video_id generated by Paiwo API must be passed in source_video_id or video_media_id Encoding needs to be h.264/h.265

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
Request Body Example
1{
2"keyframe_id": 1,
3"source_video_id": 0
4}
Code Sample cURL
1curl -X POST "https://api.digislash.com/openapi/v2/video/mask/selection" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"keyframe_id": 1,
6"source_video_id": 0
7}'
Response
1▼{
2"ErrCode": 0,
3"ErrMsg": "success",
4▼"RespData": {
5"id": 123456
6}
7}