Image-to-Video
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Fixed value i2v
Model Name, Supported: VE3.1 VE3.1F
Prompt, maximum 2000 characters
First frame image, used in conjunction with lastFrame to enable video generation from the first and last frames.
Image Link
Last frame image; first frame image must also be provided.
Image Link
Provided for reference-based image and video generation
Image URL
Negative prompt, used to describe content you do not want to appear in the image, up to 1000 characters.
Number of generations, default 1, supported values: 1, 2, 3, 4
Aspect ratio, default 16:9, supported: 16:9, 9:16
Video duration, in seconds, default 8, supported values: 4, 6, 8
Resolution, default 720p, supported: 720p, 1080p, 4K
Whether to generate audio, defaults to false
Character generation policy, default: allow_adult, supported values: allow_adult, disallow
Random seed, value range: 0-4294967295
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 Tokens
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", "image": { "imageUrl": "string" }, "referenceImages": { "imageUrl": "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"
}