Endpoints
| Method | Endpoint | Description |
|---|
| POST | /api/v1/generateTask/wan-2-2-animate | Create generation task |
| GET | /api/v1/statusTask/wan-2-2-animate | Query task status |
Authentication
All requests require an API Key in the header:
Authorization: Bearer YOUR_API_KEY
Request Body
{
"request_type": "async",
"callback_url": "https://your-server.com/callback",
"provider": "official",
"input": {
"mode": "standard",
"type": "animate",
"image_urls": [
"https://example.com/character.png"
],
"video_urls": [
"https://example.com/motion.mp4"
],
"prompt": "keep the face stable and follow the motion naturally",
"resolution": "480p",
"seed": -1
}
}
Parameters
async (polling) or callback (webhook)
Callback URL, required when request_type=callback (conditional)
Routing strategy: auto, value, or official
Model input parameters
mode
string
default:"standard"
required
Public mode. Currently only standard is supported.
type
string
default:"animate"
required
Behavior type: animate or replace
Source image URLs, exactly 1 item
Motion reference video URLs, exactly 1 item
Optional prompt guidance. If provided, it must be non-empty.
Output resolution: 480p or 720p
Example
Animate
curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-2-2-animate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_type": "async",
"provider": "official",
"input": {
"mode": "standard",
"type": "animate",
"image_urls": [
"https://example.com/character.png"
],
"video_urls": [
"https://example.com/motion.mp4"
],
"prompt": "keep the face stable and follow the motion naturally",
"resolution": "480p",
"seed": -1
}
}'
Replace
curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-2-2-animate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_type": "callback",
"callback_url": "https://your-server.com/callback",
"provider": "official",
"input": {
"mode": "standard",
"type": "replace",
"image_urls": [
"https://example.com/character.png"
],
"video_urls": [
"https://example.com/motion.mp4"
],
"prompt": "replace the person in the motion video with the provided character",
"resolution": "720p",
"seed": 42
}
}'
Response
POST /api/v1/generateTask/wan-2-2-animate
Returns taskId on success for subsequent status queries.
Success:
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678"
}
}
GET /api/v1/statusTask/wan-2-2-animate
Query task execution status and results via taskId.
curl -X GET "https://api.apixo.ai/api/v1/statusTask/wan-2-2-animate?taskId=task_12345678" \
-H "Authorization: Bearer YOUR_API_KEY"
Success:
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678",
"state": "success",
"resultJson": "{\"resultUrls\":[\"https://r2.apixo.ai/video.mp4\"]}",
"createTime": 1767965610929,
"completeTime": 1767965652317,
"costTime": 41388
}
}
Status Response Fields
Current task state: pending, processing, success, or failed.
JSON string containing resultUrls array. Only present on success. Parse with JSON.parse().
Error code. Only present when state is failed. See Error Codes.
Human-readable error message. Only present when state is failed.
Task creation timestamp (Unix milliseconds).
Task completion timestamp (Unix milliseconds).
Processing duration in milliseconds.
Error Codes
| Code | Description |
|---|
| 400 | Invalid parameters or request error |
| 401 | Invalid or missing API Key |
| 429 | Rate limit exceeded |
| Fail Code | Description |
|---|
CONTENT_VIOLATION | Content violates safety guidelines |
GENERATION_FAILED | Video generation failed |
Rate Limits
| Limit | Value |
|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
Exceeding limits returns 429 error. Wait and retry.
Tips
mode is fixed to standard for public API usage.
image_urls and video_urls each require exactly one URL.
resolution defaults to 480p; choose 720p when quality is more important than cost.
- Billing is duration-based with limits: below 5s is billed as 5s, above 120s is billed as 120s.
- Use
seed to improve reproducibility across repeated runs.
Wan 2.2 Animate API pricing is per second with a 5-second minimum billable duration and 120-second maximum billable duration.