/APIXO Docs

Wan 2.5

High-resolution video generation with prompt expansion support

Endpoints

MethodEndpointDescription
POST/api/v1/generateTask/wan-2-5Create generation task
GET/api/v1/statusTask/wan-2-5Query 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://...",
  "provider": "auto",
  "input": {
    "mode": "text-to-video",
    "prompt": "...",
    "resolution": "1080p",
    "duration": 10,
    "aspect_ratio": "16:9",
    "image_urls": ["..."],
    "negative_prompt": "...",
    "seed": 12345,
    "enable_prompt_expansion": true
  }
}

Parameters

Parameter
Required
Default
Description
request_typestring
async
async (polling) or callback (webhook)
callback_urlstring
Callback URL, required when request_type=callback
providerstring
auto
Routing strategy: auto, value, or official
inputobject
Model input parameters

Mode Options:

  • text-to-video — Generate video from text
  • image-to-video — Generate video from image

Example

Text-to-Video

curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-2-5" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "provider": "value",
    "input": {
      "mode": "text-to-video",
      "prompt": "a serene mountain landscape with moving clouds and gentle breeze",
      "resolution": "1080p",
      "duration": 10,
      "aspect_ratio": "16:9",
      "negative_prompt": "low quality, blurry",
      "enable_prompt_expansion": true
    }
  }'

Image-to-Video

curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-2-5" \
  -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": "image-to-video",
      "prompt": "make this picture into a smooth cinematic shot with camera slowly zooming in",
      "resolution": "720p",
      "duration": 5,
      "image_urls": ["https://example.com/ref.jpg"],
      "enable_prompt_expansion": false,
      "seed": 42
    }
  }'

Response

POST /api/v1/generateTask/wan-2-5

Returns taskId on success for subsequent status queries.

Success:

{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}

Error:

{
  "code": 400,
  "message": "Insufficient credits",
  "data": null
}

GET /api/v1/statusTask/wan-2-5

Query task execution status and results via taskId.

curl -X GET "https://api.apixo.ai/api/v1/statusTask/wan-2-5?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
  }
}

Failed:

{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "CONTENT_VIOLATION",
    "failMsg": "Content does not meet safety guidelines"
  }
}

Status Response Fields

FieldTypeDescription
taskIdstringUnique task identifier
statestringpending processing success failed
resultJsonstringJSON containing resultUrls array (on success)
failCodestringError code (on failure)
failMsgstringError message (on failure)
createTimeintegerTask creation timestamp (ms)
completeTimeintegerTask completion timestamp (ms)
costTimeintegerProcessing duration (ms)

Error Codes

CodeDescription
400Invalid parameters or request error
401Invalid or missing API Key
429Rate limit exceeded
Fail CodeDescription
CONTENT_VIOLATIONContent violates safety guidelines
INVALID_IMAGE_URLCannot access provided image URL

Rate Limits

LimitValue
Requests10000 / minute
Concurrent tasks1000

Exceeding limits returns 429 error. Wait and retry.


Tips

  • Generation time:
    • 720p resolution: ~50-70 seconds
    • 1080p resolution: ~70-90 seconds
    • Submit task, wait 50 seconds, then poll every 5 seconds
  • Callback mode: Recommend using callback mode to avoid frequent polling.
  • Video expiration: Result URLs are valid for 15 days. Download promptly.
  • Content moderation: Prompts must comply with content safety guidelines.
  • High resolution support:
    • 720p: Fast generation, for previews and social media
    • 1080p: HD output, for professional publishing and high-quality content
  • Prompt expansion:
    • enable_prompt_expansion: true (default): System auto-optimizes and expands prompt with more details
    • enable_prompt_expansion: false: Strictly uses original prompt, for precise control
    • Short prompts benefit from expansion; detailed prompts can disable it
  • Aspect ratio selection:
    • 16:9: Landscape (default), for traditional video platforms
    • 9:16: Portrait, for short video platforms and mobile viewing
    • 1:1: Square, for social media
  • Negative prompt:
    • Use negative_prompt to avoid blur, low quality, jitter, and other unwanted effects
    • Example: "low quality, blurry, shaky, distorted"
    • Helps improve video stability and clarity
  • Seed reproduction:
    • Same seed + prompt + parameters reproduces identical results
    • Ideal for consistent batch generation or iterative refinement
  • Image-to-video:
    • Reference image becomes video start frame
    • Describe desired animation effects and camera movement in prompt
    • Ideal for bringing still images to life, character animation, scene expansion
  • Prompt tips:
    • Describe specific scenes and actions (e.g., "clouds drifting over mountains", "slow dolly in")
    • Describe dynamic elements (e.g., "swaying leaves", "flowing water", "flying birds")
    • Describe camera movement (e.g., "slow push in", "orbiting shot", "wide to close")
    • Be specific; concrete descriptions work better than abstract ones
  • Duration selection:
    • 5 seconds: Quick previews, short clips, loop animations
    • 10 seconds: More narrative space, complete scene showcases
  • Image formats: image_urls supports JPG, PNG, WebP, max 10MB per image.
  • Best practices:
    • Use clear, specific prompts
    • Enable prompt expansion for richer details
    • Use negative prompt to avoid common issues
    • 720p for quick iteration, 1080p for final output

On this page