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
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 |
| negative_prompt | String | true | Prompt text describing what to avoid in the animation |
| extend_prompt | Boolean | false | Whether to use algorithm default extended prompts |
| resolution | String | true | Resolution options: 720p, 1080p, 4k |
| audio_url | String | false | Audio URL, required when audio_type = 2 |
| audio_type | Integer | true | Audio type: 1 = AI generate, 2 = user custom upload, 3 = none (no audio) |
| video_length | Integer | true | Video duration in seconds, options: 5, 10 (10s only available for pro and above subscriptions) |
| is_premium_model | Boolean | false | Whether to use premium video model for faster generation (pro and above subscriptions only) |
| effect_code | String | false | Effect code: if specified, prompt content will be ignored.Get Effect Code |
| 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 |
| - 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 |
| - _id | String | Document ID |
| - image_url | String | Input image URL |
| - prompt | String | Animation prompt |
| - negative_prompt | String | Negative prompt |
| - extend_prompt | Boolean | Whether extended prompts were used |
| - audio_type | Integer | Audio type used |
| - audio_url | String | Audio URL used |
| - deduction_credit | Integer | Credits deducted |
| - effect_code | String | Effect code used |
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.",
"negative_prompt": "blurry, distorted hands, missing fingers, unnatural pose, double hands, extra limbs, bad anatomy, low quality, cartoonish, exaggerated features, open mouth, aggressive expression, modern clothing, pixelated, vibrant colors, overexposed, flickering, blurry details, subtitles, logo, style, artwork, painting, picture, static, overall grayish, worst quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, static characters, messy background, three legs, crowded background, walking backwards",
"extend_prompt": true,
"resolution": "4k",
"audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
"audio_type": 2,
"video_length": 10,
"is_premium_model": true,
"effect_code": "squish_89244231312",
"webhookurl": ""
}
Request
curl --location 'https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt' \
--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.",
"negative_prompt": "blurry, distorted hands, missing fingers, unnatural pose, double hands, extra limbs, bad anatomy, low quality, cartoonish, exaggerated features, open mouth, aggressive expression, modern clothing, pixelated, vibrant colors, overexposed, flickering, blurry details, subtitles, logo, style, artwork, painting, picture, static, overall grayish, worst quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, static characters, messy background, three legs, crowded background, walking backwards",
"extend_prompt": true,
"resolution": "4k",
"audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
"audio_type": 2,
"video_length": 10,
"is_premium_model": true,
"effect_code": "squish_89244231312",
"webhookurl": ""
}'
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 \"negative_prompt\": \"blurry, distorted hands, missing fingers, unnatural pose, double hands, extra limbs, bad anatomy, low quality, cartoonish, exaggerated features, open mouth, aggressive expression, modern clothing, pixelated, vibrant colors, overexposed, flickering, blurry details, subtitles, logo, style, artwork, painting, picture, static, overall grayish, worst quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, static characters, messy background, three legs, crowded background, walking backwards\",\n \"extend_prompt\": true,\n \"resolution\": \"4k\",\n \"audio_url\": \"https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3\",\n \"audio_type\": 2,\n \"video_length\": 10,\n \"is_premium_model\": true,\n \"effect_code\": \"squish_89244231312\",\n \"webhookurl\": \"\"\n}");
Request request = new Request.Builder()
.url("https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt")
.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.",
"negative_prompt": "blurry, distorted hands, missing fingers, unnatural pose, double hands, extra limbs, bad anatomy, low quality, cartoonish, exaggerated features, open mouth, aggressive expression, modern clothing, pixelated, vibrant colors, overexposed, flickering, blurry details, subtitles, logo, style, artwork, painting, picture, static, overall grayish, worst quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, static characters, messy background, three legs, crowded background, walking backwards",
"extend_prompt": true,
"resolution": "4k",
"audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
"audio_type": 2,
"video_length": 10,
"is_premium_model": true,
"effect_code": "squish_89244231312",
"webhookurl": ""
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt", 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.",
"negative_prompt": "blurry, distorted hands, missing fingers, unnatural pose, double hands, extra limbs, bad anatomy, low quality, cartoonish, exaggerated features, open mouth, aggressive expression, modern clothing, pixelated, vibrant colors, overexposed, flickering, blurry details, subtitles, logo, style, artwork, painting, picture, static, overall grayish, worst quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, static characters, messy background, three legs, crowded background, walking backwards",
"extend_prompt": true,
"resolution": "4k",
"audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
"audio_type": 2,
"video_length": 10,
"is_premium_model": true,
"effect_code": "squish_89244231312",
"webhookurl": ""
}';
$request = new Request('POST', 'https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
?>
import requests
import json
url = "https://openapi.akool.com/api/open/v4/image2Video/createBySourcePrompt"
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.",
"negative_prompt": "blurry, distorted hands, missing fingers, unnatural pose, double hands, extra limbs, bad anatomy, low quality, cartoonish, exaggerated features, open mouth, aggressive expression, modern clothing, pixelated, vibrant colors, overexposed, flickering, blurry details, subtitles, logo, style, artwork, painting, picture, static, overall grayish, worst quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, static characters, messy background, three legs, crowded background, walking backwards",
"extend_prompt": true,
"resolution": "4k",
"audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
"audio_type": 2,
"video_length": 10,
"is_premium_model": true,
"effect_code": "squish_89244231312",
"webhookurl": ""
})
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": {
"create_time": 1754362985482,
"uid": 101400,
"team_id": "6805fb69e92d9edc7ca0b409",
"status": 1,
"webhookUrl": "",
"resolution": "4k",
"file_name": "Image2Video_Animate this image with .mp4",
"effect_name": "Squish",
"_id": "689174694b4dbdd4ab3d28c9",
"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 hands, missing fingers, unnatural pose, double hands, extra limbs, bad anatomy, low quality, cartoonish, exaggerated features, open mouth, aggressive expression, modern clothing, pixelated, vibrant colors, overexposed, flickering, blurry details, subtitles, logo, style, artwork, painting, picture, static, overall grayish, worst quality, JPEG compression artifacts, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, static characters, messy background, three legs, crowded background, walking backwards",
"extend_prompt": true,
"audio_type": 2,
"audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
"deduction_credit": 60,
"effect_code": "squish_89244231312"
}
}
Important Notes
- Image Quality: Use high-resolution images for better animation results
- Prompt: Use descriptive prompts to guide the animation style and motion
- Negative Prompt: Specify what to avoid (e.g., “blurry, distorted”) for cleaner results
- Effects: If
effect_codeis specified, thepromptcontent will be ignored. Browse effects with Get Available Effects - Resolution: Choose from 720p, 1080p, or 4k - higher resolution costs more credits
- Video Length: 10-second videos are only available for pro and above subscriptions
- Premium Model: Use
is_premium_modelfor faster generation (pro and above subscriptions only) - Resource Expiration: Generated videos are valid for 7 days, save them promptly
- Webhook: Use
webhookUrlto receive notifications when video generation is complete - Save the
_idfrom the response to check video status using the Get Image to Video Results API