# Image-to-Video Generation

## 1. Task Submission

- https://api-gateway.skyreels.ai/api/v1/video/image2video/submit

Request Parameters
Parameter Name Type Required Description Default Value Constraints
api_key string Yes Used for account authentication and rate limiting. N/A -
prompt string Yes The prompt describing the video to generate. N/A Max length: 1280 tokens.
first_frame_image string Yes The first frame image for the video. N/A Supported formats: jpg/jpeg, png, gif, bmp. Must be a URL.
duration int No Duration of the generated video. 5 Minimum: 3 seconds, Maximum: 15 seconds.
sound bool No Whether the generated video includes sound effects. False -
mode string No The quality/performance mode. std Supported values: "fast", "std", and "pro". "fast" offers faster generation, "std" balances speed and quality, and "pro" delivers higher quality. All modes output at 1080p. Currently, only "std" is supported; "fast" and "pro" support will be added later.
Response Parameters
Field Name Type Description
task_id string The task ID, used for subsequent queries.
msg string A message describing the result.
code int Status code (200 for success, 422 for parameter error, 500 for server error).
status string Status identifier ("ok" indicates success).
data object Response data, null on successful submission.
trace_id string Request trace ID.
Request Example
curl -X POST "https://api-gateway.skyreels.ai/api/v1/video/image2video/submit" -H "Content-Type: application/json" -d '{
"api_key": "YOUR_API_KEY",
"first_frame_image": "https://skyreels-api.oss-cn-hongkong.aliyuncs.com/examples/image2video/image_03.png",
"prompt": "Slowly pull the camera back and then cut to a frontal close up shot of the man's face looking thoughtfully at the paper in the typewriter.",
"duration": 5,
"sound": true,
"mode": "std"
}'

## 2. Task Query

- https://api-gateway.skyreels.ai/api/v1/video/image2video/task/{task_id}


Response Parameters
Field Name	Type	Description
task_id	string	The task ID.
msg	string	Status message (contains error info on failure).
code	int	Status code (200 for success, 422 for parameter error, 500 for server error).
status	string	Task status, includes: "submitted", "pending", "running", "failed", "unknown".
data	object	Contains video data on success, null for other statuses.
trace_id	string	Request trace ID.
Data Field Details (when status is "success"):
Field Name	Type	Description
video_url	string	URL of the generated video.
duration	int	Video duration in seconds.
resolution	string	Video resolution.
Request Example
curl -X GET "https://api-gateway.skyreels.ai/api/v1/video/image2video/task/{task_id}"