Skip to main content

Endpoints

MethodEndpointDescription
POST/api/v1/generateTask/wan-2-2-animateCreate generation task
GET/api/v1/statusTask/wan-2-2-animateQuery 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

request_type
string
default:"async"
async (polling) or callback (webhook)
callback_url
string
Callback URL, required when request_type=callback (conditional)
provider
string
default:"auto"
Routing strategy: auto, value, or official
input
object
required
Model input parameters

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

taskId
string
Unique task identifier.
state
string
Current task state: pending, processing, success, or failed.
resultJson
string
JSON string containing resultUrls array. Only present on success. Parse with JSON.parse().
failCode
string
Error code. Only present when state is failed. See Error Codes.
failMsg
string
Human-readable error message. Only present when state is failed.
createTime
integer
Task creation timestamp (Unix milliseconds).
completeTime
integer
Task completion timestamp (Unix milliseconds).
costTime
integer
Processing duration in milliseconds.

Error Codes

CodeDescription
400Invalid parameters or request error
401Invalid or missing API Key
429Rate limit exceeded
Fail CodeDescription
CONTENT_VIOLATIONContent violates safety guidelines
GENERATION_FAILEDVideo generation failed

Rate Limits

LimitValue
Requests10000 / minute
Concurrent tasks1000
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.