Image to Live Photo
Bring a still photo to life: generate a short video of about 4 seconds in which whatever should move (water, foliage, mist, a person's breathing and blinking, and so on) moves naturally according to the content, with slight camera movement, as if a brief clip had been filmed on location.
Two delivery formats are available via output_format: an MP4 video by default, or an Android
motion photo — a single .jpg file with the video embedded after the still image, which supported
Android galleries play on long press. Both formats cost the same.
Notes: the output uses a standard aspect ratio, which may not exactly match the source image; the resulting video has no audio track.
Before / After
Before

After
Create Task
Basic Information
| Item | Value |
|---|---|
| Request Method | POST |
| Request Path | /task/image_to_live |
| Content-Type | application/json |
| Authentication | Raw API key in the Authorization header |
Request Body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_id | string | Yes | - | Uploaded image file ID |
output_format | string | No | mp4 | Delivery format. mp4 = a short video of about 4 seconds; motion_photo = an Android motion photo (a single .jpg, with the video also returned separately). See Output Specification |
Request Example
curl -X POST https://api.ai-mcn.tv:10000/task/image_to_live \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id": "537489015178246"}'
Requesting an Android motion photo:
curl -X POST https://api.ai-mcn.tv:10000/task/image_to_live \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id": "537489015178246", "output_format": "motion_photo"}'
Success Example
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"task_type": "image_to_live",
"status": "queued"
}
}
Query Task Result
Basic Information
| Item | Value |
|---|---|
| Request Method | GET |
| Request Path | /task/image_to_live/{task_id} |
| Authentication | Raw API key in the Authorization header |
Output Result (output_result)
| Parameter | Type | Description |
|---|---|---|
file_id | string | Primary output file ID — the video when output_format=mp4, the motion photo (.jpg) when output_format=motion_photo |
download_url | string | Download path for the primary output |
video_file_id | string | File ID of the video itself (only when output_format=motion_photo) |
video_download_url | string | Download path for the video itself (only when output_format=motion_photo) |
Success Example
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"status": "completed",
"progress": 100,
"output_result": {
"file_id": "537489015178248",
"download_url": "/download/a1/output.mp4"
},
"create_time": "2026-04-05T08:00:00Z",
"update_time": "2026-04-05T08:00:30Z"
}
}
With output_format=motion_photo, the motion photo is the primary output and the video is returned alongside it:
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"status": "completed",
"progress": 100,
"output_result": {
"file_id": "537489015178248",
"download_url": "/download/a1/output.jpg",
"video_file_id": "537489015178249",
"video_download_url": "/download/a1/output.mp4"
},
"create_time": "2026-04-05T08:00:00Z",
"update_time": "2026-04-05T08:00:30Z"
}
}
Output Specification
| Item | Details |
|---|---|
| Container / codec | MP4 (H.264) |
| Duration | About 4.5 seconds |
| Frame rate | 24 fps |
| Audio | None (the output is a silent video) |
| Resolution | 768P tier, selected automatically from the input aspect ratio (see below) |
| File size | Typically 1–4 MB, depending on visual complexity |
Output Aspect Ratios
The service reads the aspect ratio of the input image and generates at the closer of two standard ratios:
| Input image | Output ratio | Output size |
|---|---|---|
| Landscape (16:9, 4:3, …) | 16:9 | 1344 × 768 |
| Portrait (9:16, 3:4, …) | 9:16 | 768 × 1344 |
| Square (1:1) | 16:9 | 1344 × 768 |
Note: the output comes in 16:9 or 9:16 only, so a source with a different ratio is cropped: a 4:3 landscape loses about 25% of its height in total, a 3:4 portrait about 25% of its width, and a square image about 44% of its height. If the composition matters, use Image Aspect Ratio Conversion to bring the source to the target ratio before calling this endpoint.
Android Motion Photo (output_format=motion_photo)
The primary output is a single .jpg file: the video above is embedded verbatim after the still
image, with its position declared in the image metadata. It is also an ordinary picture — any image
viewer opens it normally, while Android galleries that support the standard recognise it as a motion
photo and play it on long press.
| Item | Description |
|---|---|
| Container | JPEG (still image + embedded MP4, single file) |
| Still image | Keeps the source resolution, centre-cropped to the video's aspect ratio so the still and the motion share one composition |
| Embedded video | Byte-for-byte identical to the output_format=mp4 output; never re-encoded |
| File size | Typically 5-10 MB (still image plus video) |
| Companion output | The video itself is also returned as video_file_id / video_download_url and can be downloaded separately |
Compatibility boundaries (please confirm these fit your use case before integrating):
- Android: galleries on Pixel, Xiaomi, Samsung and other devices that support the standard recognise and play it.
- iOS: Apple uses a different format (a Live Photo is a HEIC + MOV pair), so iOS does not recognise this output. It appears as an ordinary still image, which opens normally without errors.
- Some devices: vendor implementations vary, and a few models may show the file as a still image only.
What the Motion Looks Like
- Elements that would naturally move do so according to the content: ripples on water, foliage swaying in the wind, drifting clouds and mist, moving traffic and pedestrians, rising steam, a person's natural breathing and blinking, and so on.
- The camera moves slightly (a slow push-in, a gentle pan, or a subtle handheld drift), so the result feels like a brief clip filmed on location rather than a frozen frame.
- The subject's appearance, pose, clothing and the overall composition stay consistent with the source image; no people or objects are added or removed.
Processing Time
A single task usually takes 6–9 minutes, including queueing. Tasks run asynchronously — poll status through the query endpoint instead of waiting synchronously.
Usage Notes
- Input image: jpg / jpeg / png / bmp / webp are supported. Photos with a clear subject and complete composition work best; scenes containing water, foliage, clouds or crowds produce the most natural motion.
- Regenerating: submitting the same image again produces a different result, so you can retry if you are not satisfied with the output.
- Billing: charged per call, regardless of the output duration. See the pricing guide for the current price.
AI-Generated Content Label
The result video and motion photo carry an implicit AI-generated content label (file metadata only; the picture is unchanged). See AI-Generated Content Labels.
Error Codes
| Error Code | HTTP Status | Description | Resolution |
|---|---|---|---|
6013 | 400 | Missing file_id | Pass the file_id field |
6016 | 400 | Invalid output_format value | Use either mp4 or motion_photo |
6014 | 400 | File type does not match the task | Upload an image file |
6004 | 404 | File not found | Verify the file_id |
6017 | 400 | The file is not a recognizable image (for example, a web page saved as .jpg, or a file whose header is cut off). It is rejected at task creation; no task is created and nothing is charged | Re-export the image as JPEG / PNG and upload it again |
6502 | 401 | Authentication failed | Check the Authorization header |
6202 | 402 | Insufficient balance | Recharge in the Dashboard |
6021 | — | The image data is incomplete or damaged, typically truncated by an interrupted download or upload. The file header is intact, so this can't be detected at task creation (during execution: the task fails and credits are refunded; see error_code in the task result) | Re-export the image or use the original, then resubmit |