Reference Video Generation VQ2
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Fixed value i2v
Model Name, Supported: viduq2
Reference image information (non-subject invocation mode), supporting up to seven images
Image Link
Generated prompt text, required
Video duration in seconds, supported range: [1, 10]
Resolution, supported: 360p, 540p, 720p, 1080p
Random seed, optional
Aspect ratio (default: 16:9, available values: 16:9, 9:16, 3:4, 4:3, 1:1)
Whether to enable background music, optional, defaults to false
Refer to subject information (subject invocation mode) (up to three images per subject, maximum of seven images supported). serverId mode: ID returned by the subject API, supporting a maximum of 7.
Refer to the main image information
Image URL
Refer to the entity identifier information, which must be generated by calling the Create Entity API.
Identification information for the prompt; use @xxx in the prompt. When passing serverId, this parameter value must be set to the elementName of the subject.
Reference subject voice timbre, optional
Whether to enable audio (main invocation mode). false: Direct audio and video output is not required, outputting a silent video. true: Direct audio and video output is required, outputting a video with dialogue and background audio. Note 1: The voice_id parameter takes effect only when this parameter is set to true.
Response Body
application/json
Success
TypeScript Definitions
Use the response body type in TypeScript.
Status Code
Data Object
Result Set
Usage Information
Number of Images
Video Duration in Seconds
Input Token Count
Total Token Count
Output Token Count
Validity Period
Task ID
Task Status
Status Information
Request ID
curl -X POST "https://api.ygw.ai/api/v1/video/generation" \ -H "Authorization: string" \ -H "Content-Type: application/json" \ -d '{ "_action": "string", "model": "string", "characterImages": [ { "imageUrl": "string" } ], "prompt": "string", "subjects": [ { "images": [ { "imageUrl": "string" } ], "serverId": "string", "id": "string" } ] }'{
"code": 0,
"data": {
"urls": [
"string"
],
"usage": {
"images": 0,
"seconds": 0,
"input_tokens": 0,
"total_tokens": 0,
"output_tokens": 0
},
"expired": "string",
"task_id": "string",
"task_status": "string"
},
"message": "string",
"request_id": "string"
}