Image-to-Video - Based on First Frame
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Configuration parameters for asynchronous processing. HTTP requests only support asynchronous mode and must be set to enable.
Request Body
application/json
Model name, fixed value: happyhorse-1.0-i2v
Basic input information, such as prompts.
Text prompt. Used to describe the desired video content to be generated. Supports input in any language, with a maximum length of 5,000 non-Chinese characters or 2,500 Chinese characters; any excess will be automatically truncated.
Input media list. Used to specify the images required for video generation.
Media asset type, fixed value: first_frame (first frame)
Media asset URL.
Video processing parameters, such as setting video resolution and duration.
Video resolution, supported: 720P, 1080P (default). The model automatically scales based on the selected resolution level, and the aspect ratio of the output video approximately matches that of the first input frame.
Video duration in seconds, an integer in the range [3, 15], default 5.
Whether to add a watermark in the bottom-right corner of the video (text fixed as "Happy Horse"), default true
Random seed, value range [0, 2147483647]. A fixed seed value improves the reproducibility of generated results.
Response Body
application/json
Success
TypeScript Definitions
Use the response body type in TypeScript.
Status Code
Data Object
Result Set
Usage Information
Image Count
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 "X-DashScope-Async: string" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "input": {}, "parameters": {} }'{
"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"
}