Skip to main content

Endpoint

GET https://openapi.akool.com/api/open/v3/content/video/infobymodelid?video_model_id={{video_model_id}}

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

Query Parameters

ParameterTypeRequiredDescription
video_model_idStringtrueThe _id returned from the Create Character Swap API

Response Attributes

ParameterTypeDescription
codeIntegerInterface returns business status code (1000:success)
msgStringInterface returns status information
dataObjectResponse data object
- _idStringDocument ID
- create_timeLongCreation timestamp
- uidIntegerUser ID
- team_idStringTeam ID
- update_timeLongLast update time/completion time
- video_durationNumberActual video duration
- webhookUrlStringCallback URL
- file_nameStringFile name
- image_urlStringInput image URL
- videoStringGenerated video URL (available when video_status is 3)
- video_urlStringInput source video URL
- promptStringPrompt text
- resolutionStringResolution
- deduction_creditIntegerActual credits deducted
- video_statusIntegerStatus: 1=queueing, 2=processing, 3=completed, 4=failed
- faceswap_fail_reasonStringError reason (when video_status is 4)

Example

Request

curl --location 'https://openapi.akool.com/api/open/v3/content/video/infobymodelid?video_model_id=689174694b4dbdd4ab3d28c9' \
--header 'x-api-key: {{API Key}}'

Response

Queueing Status (video_status = 1)

{
  "code": 1000,
  "msg": "OK",
  "data": {
    "_id": "689174694b4dbdd4ab3d28c9",
    "create_time": 1754362985482,
    "uid": 101400,
    "team_id": "6805fb69e92d9edc7ca0b409",
    "video_duration": 10,
    "webhookUrl": "https://your-callback-url.com/webhook",
    "file_name": "CharacterSwap_1754362985482.mp4",
    "image_url": "https://drz0f01yeq1cx.cloudfront.net/character-image.png",
    "video_url": "https://drz0f01yeq1cx.cloudfront.net/source-video.mp4",
    "prompt": "Smooth character animation with natural movement",
    "resolution": "720p",
    "deduction_credit": 20,
    "video_status": 1
  }
}

Completed Status (video_status = 3)

{
  "code": 1000,
  "msg": "OK",
  "data": {
    "_id": "689174694b4dbdd4ab3d28c9",
    "create_time": 1754362985482,
    "uid": 101400,
    "team_id": "6805fb69e92d9edc7ca0b409",
    "update_time": 1754363095482,
    "video_duration": 10.5,
    "webhookUrl": "https://your-callback-url.com/webhook",
    "file_name": "CharacterSwap_1754362985482.mp4",
    "image_url": "https://drz0f01yeq1cx.cloudfront.net/character-image.png",
    "video": "https://d2qf6ukcym4kn9.cloudfront.net/1754363091791-1423.mp4",
    "video_url": "https://drz0f01yeq1cx.cloudfront.net/source-video.mp4",
    "prompt": "Smooth character animation with natural movement",
    "resolution": "720p",
    "deduction_credit": 20,
    "video_status": 3
  }
}

Failed Status (video_status = 4)

{
  "code": 1000,
  "msg": "OK",
  "data": {
    "_id": "689174694b4dbdd4ab3d28c9",
    "create_time": 1754362985482,
    "uid": 101400,
    "team_id": "6805fb69e92d9edc7ca0b409",
    "update_time": 1754363095482,
    "video_duration": 10,
    "webhookUrl": "https://your-callback-url.com/webhook",
    "file_name": "CharacterSwap_1754362985482.mp4",
    "image_url": "https://drz0f01yeq1cx.cloudfront.net/character-image.png",
    "video_url": "https://drz0f01yeq1cx.cloudfront.net/source-video.mp4",
    "prompt": "Smooth character animation with natural movement",
    "resolution": "720p",
    "deduction_credit": 0,
    "video_status": 4,
    "faceswap_fail_reason": "Failed to process the video. Please check your input resources."
  }
}

Video Status

StatusDescription
1In Queue - Your request is waiting to be processed
2Processing - Video is currently being generated
3Success - Video completed, result URL is available in the video field
4Failed - Video generation failed, check faceswap_fail_reason for details

Important Notes

  • Use the _id field from the Create Character Swap API response as the video_model_id parameter
  • Poll this endpoint periodically to check the video generation status
  • When video_status is 3 (Success), the video field will contain the URL of the generated video
  • Generated videos are valid for 7 days, download and save them promptly
  • If a webhook URL was provided during creation, you will receive a callback when the task completes (no need to poll)