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.
API Endpoints
Character Swap Operations
- Create Character Swap - Create animated video from character image and source video
- Get Video Info Result - Retrieve character swap video results by ID
Getting Started
Basic Workflow
-
Create Character Swap Video:
- Prepare your character image URL (PNG or JPEG)
- Prepare your source video URL (MP4) with the motion to apply
- Optionally provide duration, resolution, mode, and prompt
- Call the Create Character Swap API with your resources
-
Check Results:
- Use the Get Video Info Result API to check the status of your video
- Download the result URL when the status is “Success” (video_status = 3)
Response Code Description
Please note that if the value of the response code is not equal to 1000, the request
has failed or encountered an error.
| Code | Description |
|---|---|
| 1000 | Success |
| 1003 | Parameter error or Parameter cannot be empty |
| 1008 | The content you get does not exist |
| 1009 | You do not have permission to operate |
| 1015 | Create video error, please try again later |
| 1101 | Invalid authorization or The request token has expired |
| 1102 | Authorization cannot be empty |
| 1200 | The account has been banned |
Pricing
Character Swap
| Resolution | Unit Credit (per 5 seconds) |
|---|---|
| 480p | 5 credits |
| 720p | 10 credits |
| 1080p | 15 credits |
Video Status Codes
When checking results, thevideo_status field indicates the current state:
| Status | Description |
|---|---|
| 1 | In Queue - Your request is waiting to be processed |
| 2 | Processing - Character swap video is currently being generated |
| 3 | Success - Video completed, result URL is available |
| 4 | Failed - Video generation failed, please check your input resources |
Best Practices
Image Requirements
- Quality: Use high-resolution images for better results
- Face Visibility: Ensure the character face is clearly visible and not obscured
- Lighting: Well-lit images produce better character swap results
- Angle: Frontal or slight angle faces work best
Video Requirements
- Format: MP4 format is required
- Quality: Use clear, high-quality source videos
- Duration: Maximum video duration is 120 seconds
- Motion: The source video should contain the motion you want to apply to the character
API Usage Tips
- Webhook: Use the
webhookUrlparameter to receive notifications when processing is complete - Prompt: Use the
promptparameter for generation guidance (max 500 characters) - Resolution: Choose appropriate resolution (480p or 720p) based on your needs - higher resolution may take longer to process
- Mode: Choose between “animate” (character animation) or “replace” (face replacement) based on your use case
- Result Cleanup: Save generated videos promptly as they expire after 7 days
Common Use Cases
Basic Character Animation
Create a character animation video by applying motion from a source video:Character Animation with Prompt
Use theprompt parameter for enhanced control over the animation:
Face Replacement Mode
Replace faces in a video with a character face:Notes
- Pro Plan Required: Character Swap feature requires Pro plan or higher subscription
- Video Duration: If not specified, the duration will be automatically detected from the source video. Maximum duration is 120 seconds
- Mode Options:
animate: Applies character animation to the image using the video’s motionreplace: Replaces faces in the video with the character from the image
- Webhook Callbacks: If a webhook URL is provided, you will receive a POST request when the task status changes to completed (3) or failed (4)