Docs Ali Pix /openapi/v2/video/modify/generate
API reference

Video editing (Modify) generates videos

Edit specified video frames with mask selection and reference-image replacement; describe intent via prompt.

POST/openapi/v2/video/modify/generate

Body Parametersapplication/json

img_ids array

The img_id obtained through the upload interface supports up to 3

items
integer integer
keyframe_ids integer

Specify which frame in the video to use for replacement (editing)

mask_ids array

The mask_id obtained through the swap-mask interface supports up to 3

items
string string
prompt* string

If a mask is used in the prompt, please use @selection0, @selection1; if a reference image is used, please use @img0, @img1 , supports 5000 characters

quality* string

"360p","540p","720p"

source_video_id* string

The video_id generated by Paiwo AI 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
Request Body Example
1{
2"img_ids": [
3123
4],
5"keyframe_ids": 1,
6"mask_ids": [
7"3847593904"
8],
9"prompt": "@selection0 subject is swapped with @img0",
10"quality": "540p",
11"source_video_id": "1234",
12"video_media_id": 1234
13}
Code Sample cURL
1curl -X POST "https://api.digislash.com/openapi/v2/video/modify/generate" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"img_ids": [
6123
7],
8"keyframe_ids": 1,
9"mask_ids": [
10"3847593904"
11],
12"prompt": "@selection0 subject is swapped with @img0",
13"quality": "540p",
14"source_video_id": "1234",
15"video_media_id": 1234
16}'
Response
1▼{
2"ErrCode": 0,
3"ErrMsg": "success",
4▼"RespData": {
5"id": 123456
6}
7}