The resources (image, video, voice) generated by our API are valid for 7 days.
Please save the relevant resources as soon as possible to prevent expiration.
Endpoint
POST https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt/batch
Request Headers
| Parameter | Value | Description |
|---|---|---|
| x-api-key | API Key | Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded. |
| Authorization | Bearer {token} | Your API Key used for request authorization.Get Token |
Body Attributes
| Parameter | Type | Required | Description |
|---|---|---|---|
| image_url | String | true | Image URL to be animated |
| prompt | String | true | Prompt text describing how to animate the image |
| model_name | String | false | AI model name (get available models from Get AI Model List) |
| negative_prompt | String | false | Prompt text describing what to avoid in the animation |
| extend_prompt | Boolean | false | Whether to use algorithm default extended prompts |
| resolution | String | true | Resolution value (e.g., 720p, 1080p, 4k). Available options are retrieved from the resolutionList field of the selected model in Get AI Model List |
| video_length | Integer | true | Video duration in seconds. Available durations are retrieved from the durationList field of the selected model in Get AI Model List |
| last_image_url | String | false | URL of the image to use as the last frame of the video |
| generate_audio | Boolean | false | Whether to generate AI audio alongside the video. Only applicable to models that support audio generation — check the generate_audio field in Get AI Model List (non-null means supported). Default: false. Enabling this on supported models may increase credit consumption |
| count | Integer | false | Number of videos to create simultaneously (1-10), default: 1 |
| webhookurl | String | false | Callback URL for POST requests |
Response Attributes
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Interface returns business status code (1000:success) |
| msg | String | Interface returns status information |
| data | Object | Response data object |
| - successList | Array | Array of successfully created video tasks |
| - errorList | Array | Array of failed tasks with error information |
successList Item Attributes
| Parameter | Type | Description |
|---|---|---|
| _id | String | Document ID |
| create_time | Long | Creation timestamp |
| uid | Integer | User ID |
| team_id | String | Team ID |
| status | Integer | Task status: 1=queueing, 2=processing, 3=completed, 4=failed |
| webhookUrl | String | Callback URL |
| resolution | String | Video resolution |
| file_name | String | Output file name |
| effect_name | String | Effect name |
| image_url | String | Input image URL |
| prompt | String | Animation prompt |
| negative_prompt | String | Negative prompt |
| extend_prompt | Boolean | Whether extended prompts were used |
| last_image_url | String | Last frame image URL |
| deduction_credit | Integer | Credits deducted |
| model_name | String | AI model name used |
| batch_id | String | Batch ID for grouping videos created in the same request |
| batch_count | Integer | Total number of videos in this batch |
Example
Request Body
{
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"model_name": "seedance-1-0-lite-i2v-250428",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": true,
"resolution": "720p",
"video_length": 5,
"last_image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-last-frame.png",
"count": 3
}
Request Body - With Audio Generation
Usegenerate_audio when the selected model supports audio generation (e.g., AkoolImage2VideoFastV1, AkoolImage2VideoHDV1):
{
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and ambient background sound.",
"model_name": "AkoolImage2VideoFastV1",
"resolution": "720p",
"video_length": 5,
"generate_audio": true,
"count": 1
}
Request
curl --location 'https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt/batch' \
--header 'x-api-key: {{API Key}}' \
--header 'Content-Type: application/json' \
--data '{
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"model_name": "seedance-1-0-lite-i2v-250428",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": true,
"resolution": "720p",
"video_length": 5,
"last_image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-last-frame.png",
"count": 3
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"image_url\": \"https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png\",\n \"prompt\": \"Animate this image with smooth camera movement and subtle object motion.\",\n \"model_name\": \"seedance-1-0-lite-i2v-250428\",\n \"negative_prompt\": \"blurry, distorted, low quality\",\n \"extend_prompt\": true,\n \"resolution\": \"720p\",\n \"video_length\": 5,\n \"last_image_url\": \"https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-last-frame.png\",\n \"count\": 3\n}");
Request request = new Request.Builder()
.url("https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt/batch")
.method("POST", body)
.addHeader("x-api-key", "{{API Key}}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
const myHeaders = new Headers();
myHeaders.append("x-api-key", "{{API Key}}");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"model_name": "seedance-1-0-lite-i2v-250428",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": true,
"resolution": "720p",
"video_length": 5,
"last_image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-last-frame.png",
"count": 3
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt/batch", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
<?php
$client = new Client();
$headers = [
'x-api-key' =>'{{API Key}}',
'Content-Type' => 'application/json'
];
$body = '{
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"model_name": "seedance-1-0-lite-i2v-250428",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": true,
"resolution": "720p",
"video_length": 5,
"last_image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-last-frame.png",
"count": 3
}';
$request = new Request('POST', 'https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt/batch', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
?>
import requests
import json
url = "https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt/batch"
payload = json.dumps({
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"model_name": "seedance-1-0-lite-i2v-250428",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": True,
"resolution": "720p",
"video_length": 5,
"last_image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-last-frame.png",
"count": 3
})
headers = {
'x-api-key':'{{API Key}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response
{
"code": 1000,
"msg": "OK",
"data": {
"successList": [
{
"_id": "689174694b4dbdd4ab3d28c9",
"create_time": 1754362985482,
"uid": 101400,
"team_id": "6805fb69e92d9edc7ca0b409",
"status": 1,
"webhookUrl": "",
"resolution": "720p",
"file_name": "Image2Video_Animate this image with .mp4",
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": true,
"deduction_credit": 5,
"model_name": "seedance-1-0-lite-i2v-250428",
"batch_id": "1754362985482_101400",
"batch_count": 3
},
{
"_id": "689174694b4dbdd4ab3d28ca",
"create_time": 1754362985483,
"uid": 101400,
"team_id": "6805fb69e92d9edc7ca0b409",
"status": 1,
"webhookUrl": "",
"resolution": "720p",
"file_name": "Image2Video_Animate this image with .mp4",
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": true,
"deduction_credit": 5,
"model_name": "seedance-1-0-lite-i2v-250428",
"batch_id": "1754362985482_101400",
"batch_count": 3
},
{
"_id": "689174694b4dbdd4ab3d28cb",
"create_time": 1754362985484,
"uid": 101400,
"team_id": "6805fb69e92d9edc7ca0b409",
"status": 1,
"webhookUrl": "",
"resolution": "720p",
"file_name": "Image2Video_Animate this image with .mp4",
"image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
"prompt": "Animate this image with smooth camera movement and subtle object motion.",
"negative_prompt": "blurry, distorted, low quality",
"extend_prompt": true,
"deduction_credit": 5,
"model_name": "seedance-1-0-lite-i2v-250428",
"batch_id": "1754362985482_101400",
"batch_count": 3
}
],
"errorList": []
}
}
Important Notes
- Batch Size: You can create 1-10 videos simultaneously in a single request
- Model Selection: Use the Get AI Model List API to get available models and their supported resolutions/durations
- Resolution: Available options depend on the selected model; check the model’s
resolutionListfield - Video Length: Available durations depend on the selected model; check the model’s
durationListfield - Last Frame: Use
last_image_urlto specify what the video’s last frame should look like - Audio Generation: Set
generate_audiototrueto add AI-generated audio to the output video. This parameter is only effective for models where thegenerate_audiofield is not null in the Get AI Model List response. If the selected model does not support audio generation, this parameter is ignored - Credits: Each video in the batch is charged individually based on resolution and duration. Enabling
generate_audioon supported models may increase credit consumption - Resource Expiration: Generated videos are valid for 7 days, save them promptly
- Webhook: Use
webhookUrlto receive notifications when each video generation is complete - Save the
_idvalues from the response to check video status using the Get Image to Video Results API