Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.akool.com/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

POST https://openapi.akool.com/api/open/v4/image2Video/updateVideoAudio

Request Headers

ParameterValueDescription
x-api-keyAPI KeyYour 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.
AuthorizationBearer {token}Your API Key used for request authorization.Get Token

Body Attributes

ParameterTypeRequiredDescription
pre_video_idStringtrueImage to Video result _id
audio_urlStringtrueAudio URL, required when audio_type = 2
audio_typeIntegertrue1 = AI Generate, 2 = user custom upload

Response Attributes

ParameterTypeDescription
codeIntegerInterface returns business status code (1000:success)
msgStringInterface returns status information
dataObjectResponse data object
- create_timeLongCreation timestamp
- uidIntegerUser ID
- team_idStringTeam ID
- update_timeLongLast update time
- video_durationNumberVideo duration
- webhookUrlStringCallback URL
- resolutionStringResolution
- file_nameStringFile name
- effect_nameStringEffect name
- _idStringDocument ID
- pre_video_idStringOriginal video ID
- image_urlStringImage URL
- promptStringPrompt text
- negative_promptStringNegative prompt
- extend_promptBooleanWhether extended prompts were used
- audio_typeIntegerAudio type
- audio_urlStringAudio URL
- deduction_creditIntegerCredits deducted
- effect_codeStringEffect code
- statusIntegerStatus: 1=queueing, 2=processing, 3=completed, 4=failed
- only_add_audioBooleanWhether only audio was added

Example

Request Body

{
  "pre_video_id": "6890830af27dfad2a3e6062d",
  "audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
  "audio_type": 2
}

Request

curl --location 'https://openapi.akool.com/api/open/v4/image2Video/updateVideoAudio' \
--header 'x-api-key: {{API Key}}' \
--header 'Content-Type: application/json' \
--data '{
  "pre_video_id": "6890830af27dfad2a3e6062d",
  "audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
  "audio_type": 2
}'

Response

{
  "code": 1000,
  "msg": "OK",
  "data": {
    "create_time": 1754374697629,
    "uid": 101400,
    "team_id": "6805fb69e92d9edc7ca0b409",
    "update_time": 1754374394023,
    "video_duration": 5.063,
    "webhookUrl": "",
    "resolution": "4k",
    "file_name": "Image2Video_Animate this image with .mp4",
    "effect_name": "Squish",
    "_id": "6891a2295d612f78c9204f77",
    "pre_video_id": "6891a07f5d612f78c9204f1c",
    "image_url": "https://drz0f01yeq1cx.cloudfront.net/1753772478686-9524-b6e4169bb1b44d5d8361936b3f6eddb8.png",
    "prompt": "Animate this image with smooth camera movement and subtle object motion.",
    "negative_prompt": "",
    "extend_prompt": false,
    "audio_type": 2,
    "audio_url": "https://drz0f01yeq1cx.cloudfront.net/1753772497950-9213-1749809724426audio.mp3",
    "deduction_credit": 5,
    "effect_code": "squish_89244231312",
    "status": 1,
    "only_add_audio": true
  }
}

Important Notes

  • The pre_video_id must be the _id of a completed video (status = 3) from a previous Create Image to Video request
  • When audio_type is 2 (custom upload), the audio_url parameter is required
  • When audio_type is 1 (AI generate), the system will automatically generate matching audio
  • The response creates a new video entry with its own _id; use this to track the audio update status via Get Image to Video Results
  • Video to Audio is charged separately (5 credits for 5s, 10 credits for 10s) unless included in the original Image to Video creation