Live Photo Pack
Upload a photo and a video to get an Android motion photo and an Apple Live Photo.
This API only packages your files. It does not generate any footage: the photo is the photo you sent and the video is the video you sent. Use it when you already have the material and want it to move on long press in a phone gallery. If you only have a photo and want it animated, use Image to Live Photo.
Choose the delivery platform with target: Android, Apple, or both (the default).
Create Task
Basic Information
| Item | Value |
|---|---|
| Method | POST |
| Path | /task/live_photo_pack |
| Content-Type | application/json |
| Authentication | Authorization header (pass the API Key directly) |
Request Parameters (Body)
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
file_id | string | Yes | — | File ID of the uploaded photo: jpg / jpeg / png / webp / bmp |
video_file_id | string | Yes | — | File ID of the uploaded video. Up to 1 GB and 2 hours |
target | string | No | both | Delivery platform: android / ios / both. Unrecognized values are treated as both |
mute | boolean | No | false | Remove the sound from the video |
Request Example
curl -X POST https://api.ai-mcn.tv:10000/task/live_photo_pack \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id": "537489015178246", "video_file_id": "537489015178250"}'
Apple Live Photo only, without sound:
curl -X POST https://api.ai-mcn.tv:10000/task/live_photo_pack \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id": "537489015178246", "video_file_id": "537489015178250", "target": "ios", "mute": true}'
Success Response Example
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"task_type": "live_photo_pack",
"status": "queued"
}
}
Query Task Result
Basic Information
| Item | Value |
|---|---|
| Method | GET |
| Path | /task/live_photo_pack/{task_id} |
| Authentication | Authorization header (pass the API Key directly) |
Response Parameters (output_result)
| Name | Type | Returned | Description |
|---|---|---|---|
target | string | Always | The delivery platform actually applied |
file_id | string | Always | Main product. An Android motion photo when target is android or both; the still image of the Apple Live Photo when target is ios |
download_url | string | Always | Download path of the main product |
ios_photo_file_id | string | target=both only | Still image of the Apple Live Photo (.jpg) |
ios_photo_download_url | string | target=both only | Download path of the above |
ios_video_file_id | string | target is ios or both | Video of the Apple Live Photo (.mov) |
ios_video_download_url | string | target is ios or both | Download path of the above |
Success Response Example
target=both (default):
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"status": "completed",
"progress": 100,
"output_result": {
"target": "both",
"file_id": "537489015178248",
"download_url": "/download/a1/output.jpg",
"ios_photo_file_id": "537489015178249",
"ios_photo_download_url": "/download/a1/output.jpg",
"ios_video_file_id": "537489015178251",
"ios_video_download_url": "/download/a1/output.mov"
},
"create_time": "2026-09-15T08:00:00Z",
"update_time": "2026-09-15T08:00:12Z"
}
}
target=ios:
{
"code": 200,
"msg": "success",
"data": {
"task_id": "537489015178247",
"status": "completed",
"progress": 100,
"output_result": {
"target": "ios",
"file_id": "537489015178248",
"download_url": "/download/a1/output.jpg",
"ios_video_file_id": "537489015178251",
"ios_video_download_url": "/download/a1/output.mov"
},
"create_time": "2026-09-15T08:00:00Z",
"update_time": "2026-09-15T08:00:12Z"
}
}
Output Specification
Android Motion Photo
The main product is a single .jpg file: your video is embedded after the still image, and metadata inside the image declares where it is. It is also an ordinary image that any viewer can open; Android galleries that support the standard recognize 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 original resolution, center-cropped to the video aspect ratio so the still and the motion match |
| Embedded video | H.264 / HEVC picture is not re-encoded; if you uploaded a standard MP4, the embedded video is your original file |
| File size | Roughly the photo plus the video |
Apple Live Photo
An Apple Live Photo is a pair of files: a .jpg still image and a .mov video, paired by the same identifier embedded in both.
| Item | Description |
|---|---|
| Still image | JPEG, original resolution, center-cropped to the video aspect ratio; shooting metadata of the original photo is kept |
| Video | MOV; H.264 / HEVC picture is not re-encoded |
| Pairing | Every task generates a new identifier, so submitting the same files twice gives two unrelated Live Photos |
Video Handling
- H.264 or HEVC video is not re-encoded; only the container changes.
- Video in any other codec is transcoded to H.264 first, with a slight quality loss.
- If the file has several picture streams (for example a cover image), only the real video is kept.
- With
mute=truethe sound is removed for both platforms; sound is kept by default.
Compatibility
Please confirm your target scenario before integrating:
Apple
- The still image and the video must be imported together in the same import to be recognized as a Live Photo. Working options: select both files and import them in the Photos app on a Mac (it syncs to iPhone via iCloud), or save both files at once through the system photo library API in your own app.
- Downloading the two files on an iPhone and saving them to the gallery one by one does not pair them; you get a photo and a video.
- Programmatically created Live Photos cannot be set as a live wallpaper. This is a system limitation.
Android
- Galleries on Pixel, Xiaomi, Samsung and other devices that support the standard recognize and play it.
- Implementations differ between vendors; a few devices may show only the still image.
- The iOS gallery does not recognize Android motion photos and shows a plain still image.
Processing Time
Standard H.264 / HEVC video usually finishes within seconds to a minute. Videos that need transcoding take longer the longer they are. The task runs asynchronously; poll status through the query API after submitting.
Tips
- Aspect ratio: the still image is cropped to the video aspect ratio. To keep the photo composition, make the video and the photo the same aspect ratio.
- Video length: native Live Photos are about 3 seconds. Very long videos load slowly in some galleries or show only the still image; keeping it under a dozen or so seconds is recommended.
- Billing: charged per task, regardless of video length or size. See Pricing for the actual price.
Error Codes
| Code | HTTP Status | Description | Solution |
|---|---|---|---|
6013 | 400 | file_id or video_file_id is missing | Both parameters are required |
6014 | 400 | File type does not match the parameter | Pass a photo as file_id and a video as video_file_id |
6004 | 404 | File not found | Check the file IDs |
6002 | 413 | Video larger than 1 GB | Compress or trim the video and upload again |
6019 | 400 | Video duration is 0 or longer than 2 hours | Trim the video and upload again |
6017 | 400 | Video cannot be parsed | Check whether the video is damaged, or export it in another format |
6502 | 401 | Authentication failed | Check the Authorization header |
6202 | 402 | Insufficient balance | Top up in the dashboard |