Image to Video
Image to Video API
Description
The Image to Video API turns a single static image into a dynamic video. Provide the subject or scene image via image_url, then use prompt to describe the motion, camera work, atmosphere, and style, so the frame moves naturally while preserving the original visual characteristics. This endpoint is ideal for rapidly expanding product photos, portraits, scene concept art, or visual drafts into short-form video assets.
Use Cases
- Turn existing images, posters, or product photos into playable video content.
- Bring natural motion and camera changes to characters, products, scenes, or character assets.
- Produce social media clips, ad drafts, and creative previews based on an established visual direction.
Endpoint Information
| Item | Description |
|---|---|
| Create task | POST /videos/image2video |
| Query task | GET /videos/image2video/{task_id} |
| Authentication | Bearer Token |
The full request URL consists of the base URL and the endpoint path; see API Basics.
Create Task
Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | string | Yes | - | Model name. bach-1.0-preview is recommended |
image_url | string | Yes | - | Input image URL; must be an HTTP/HTTPS URL |
prompt | string | No | - | Video content description, up to 10,000 characters |
negative_prompt | string | No | - | Content you do not want to appear in the video, up to 10,000 characters |
resolution | string | Yes | - | Output resolution. Allowed values: 720p, 1080p |
duration | integer | No | 6 | Video duration, range 1-6 seconds |
fps | integer | No | 24 | Video frame rate. Allowed values: 24, 30 |
cfg_scale | number | No | 5.0 | Prompt guidance strength, range 1.0-15.0 |
enhance_prompt | boolean | No | true | Whether to enable prompt enhancement |
generate_audio | boolean | No | false | Whether to generate audio |
audio_prompt | string | No | - | Audio description, up to 200 characters; only effective when generate_audio=true |
callback_url | string | No | - | Callback URL invoked when the task completes; must be an HTTP/HTTPS URL, up to 500 characters |
seed | integer | No | - | Random seed, range 0-10000000; if omitted, handled by the system |
Constraints:
image_urlandresolutionare required;image_urlmust be an accessible HTTP/HTTPS URL;resolutiononly supports720pand1080p;durationsupports1-6seconds;fpsonly supports24and30.
Request Example
bash
Copycurl -X POST '<BASE_URL>/videos/image2video' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <API_TOKEN>' \
-d '{
"model_name": "bach-1.0-preview",
"image_url": "https://example.com/images/product-scene.jpg",
"prompt": "Camera slowly pushes in, the product rotates gently under soft lighting, background stays clean and premium",
"negative_prompt": "blurry, low quality, distorted frames",
"resolution": "1080p",
"duration": 6,
"fps": 24,
"generate_audio": false
}'
Success Response
json
Copy{
"code": 200,
"data": {
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": 1778313600,
"status": "TASK_PENDING"
},
"timestamp": 1778313600
}
| Field | Type | Description |
|---|---|---|
task_id | string | Task ID, used to query the result |
created_at | number | Task creation time, Unix timestamp in seconds |
status | string | Task status; see Task Status |
Query Task
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | Task ID returned by the create-task endpoint |
Request Example
bash
Copycurl -X GET '<BASE_URL>/videos/image2video/550e8400-e29b-41d4-a716-446655440000' \
-H 'Authorization: Bearer <API_TOKEN>'
Success Response
json
Copy{
"code": 200,
"data": {
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "TASK_SUCCEEDED",
"created_at": 1778313600,
"started_at": 1778313610,
"completed_at": 1778313700,
"video_url": "https://example.com/result.mp4"
},
"timestamp": 1778313700
}
| Field | Type | Description |
|---|---|---|
task_id | string | Task ID |
status | string | Task status; see Task Status |
created_at | number | Task creation time, Unix timestamp in seconds |
started_at | number | Time the task started processing, Unix timestamp in seconds |
completed_at | number | Task completion time, Unix timestamp in seconds |
video_url | string | Generated video URL |
Notes
- Image to Video requires one image URL. We recommend using Batch Upload first to obtain a stable, accessible image URL.
- We recommend that
promptdescribe the subject's motion, camera changes, and target style; the clearer the description, the more stable the results. - Image to Video generates at a fixed aspect ratio; if you want to generate visuals directly from text, use the Text to Video API.
- If you need a task completion notification, pass a
callback_url— see Using Callbacks for the callback protocol; otherwise, retrieve the task status via the query endpoint.
Related Documents
On this page