Single Image/First and Last Frames/Reference Frame Video Generation V20
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Fixed value i2v
Model name, supported: vidu2.0, viduq1, viduq1-classic
Generated prompt text
Video duration, in seconds, supported: 4
Resolution, supported: 360p, 720p, 1080p
Random Seed
Aspect ratio, default 16:9, supported: 16:9, 9:16, 1:1
Motion amplitude, default: auto, supported: auto, small, medium, large
Whether to enable audio, default false. Only supported for image-to-video.
Whether to enable background music, default is false
Image information, required for image-to-video (supported only for image-to-video)
Image Link
First and Last Frame Image Information (Only supported for video generation from first and last frames)
First Frame Image Information
Image Link
Last Frame Image Information
Image Link
Reference image information, up to three images supported (only supported for reference frame videos).
Image Link
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 Tokens
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", "prompt": "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"
}