Skip to main content

Endpoints

MethodEndpointDescription
POST/api/v1/generateTask/hailuo-2-3-fastCreate generation task
GET/api/v1/statusTask/hailuo-2-3-fastQuery 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": "auto",
  "input": {
    "mode": "standard-image-to-video",
    "prompt": "animate this character portrait into a short dynamic shot",
    "image_urls": [
      "https://example.com/input.jpg"
    ],
    "duration": 6
  }
}

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
Mode Options:
  • standard-image-to-video - Standard image-to-video, fixed output resolution 768p
  • pro-image-to-video - Pro image-to-video, fixed output resolution 1080p
Important Constraints:
  • This model only supports image-to-video.
  • Sending text-to-video modes returns Invalid mode type.
Image Rules:
  • Format must be JPG/JPEG/PNG.
  • Aspect ratio must be greater than 2:5 and less than 5:2.
  • Short side must be greater than 300px.
  • File size must not exceed 20MB.
Duration Rules:
  • standard-image-to-video requires duration, and only 6 or 10 is accepted.
  • pro-image-to-video has fixed output duration 6 seconds.

Example

Standard Image-to-Video
curl -X POST "https://api.apixo.ai/api/v1/generateTask/hailuo-2-3-fast" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "provider": "value",
    "input": {
      "mode": "standard-image-to-video",
      "prompt": "animate this still image with smooth parallax and lighting changes",
      "image_urls": ["https://example.com/input.jpg"],
      "duration": "10"
    }
  }'
Pro Image-to-Video
curl -X POST "https://api.apixo.ai/api/v1/generateTask/hailuo-2-3-fast" \
  -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": "pro-image-to-video",
      "prompt": "animate this image into a high-energy camera move",
      "image_urls": ["https://example.com/input.jpg"]
    }
  }'

Response

POST /api/v1/generateTask/hailuo-2-3-fast

Returns taskId on success for subsequent status queries. Success:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Error:
{
  "code": 400,
  "message": "Invalid mode type",
  "data": null
}

GET /api/v1/statusTask/hailuo-2-3-fast

Query task execution status and results via taskId.
curl -X GET "https://api.apixo.ai/api/v1/statusTask/hailuo-2-3-fast?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": 1767965730929,
    "costTime": 120000
  }
}
Failed:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "CONTENT_VIOLATION",
    "failMsg": "Content does not meet safety guidelines"
  }
}

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
402Insufficient credits
429Rate limit exceeded
Fail CodeDescription
CONTENT_VIOLATIONContent violates safety guidelines
INVALID_IMAGE_URLCannot access the provided image URL

Rate Limits

LimitValue
RequestsSubject to workspace and provider limits
Concurrent tasksSubject to workspace and provider limits
If limits are exceeded, the API returns 429.

Tips

  • This model only supports image-to-video.
  • Cheapest public preset: standard-image-to-video + duration=6.
  • standard-image-to-video is billed by duration. pro-image-to-video is billed per task.
  • pro-image-to-video ignores duration even if included.
  • Result URLs may be temporary. Download generated videos promptly after success.
For production workloads, prefer callback mode to reduce frequent polling.