Skip to main content

Endpoints

MethodEndpointDescription
POST/api/v1/generateTask/hailuo-2-3Create generation task
GET/api/v1/statusTask/hailuo-2-3Query 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": "make this still image move naturally with cinematic camera motion",
    "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-text-to-video - Standard text-to-video, fixed output resolution 768p
  • standard-image-to-video - Standard image-to-video, fixed output resolution 768p
  • pro-text-to-video - Pro text-to-video, fixed output resolution 1080p
  • pro-image-to-video - Pro image-to-video, fixed output resolution 1080p
Image-to-Video Rules:
  • Image 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.
  • Image size must not exceed 20MB.
Duration Rules:
  • standard-* requires duration, and only 6 or 10 is accepted.
  • pro-* has fixed output duration 5 seconds.

Example

Standard Text-to-Video
curl -X POST "https://api.apixo.ai/api/v1/generateTask/hailuo-2-3" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "provider": "value",
    "input": {
      "mode": "standard-text-to-video",
      "prompt": "a dramatic sunrise over a futuristic skyline with slow cinematic camera movement",
      "duration": "10"
    }
  }'
Pro Image-to-Video
curl -X POST "https://api.apixo.ai/api/v1/generateTask/hailuo-2-3" \
  -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": "smoothly animate this image with subtle camera push-in and natural lighting variation",
      "image_urls": ["https://example.com/input.jpg"]
    }
  }'

Response

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

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

Query task execution status and results via taskId.
curl -X GET "https://api.apixo.ai/api/v1/statusTask/hailuo-2-3?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

  • Cheapest public preset: standard-text-to-video + duration=6.
  • Use standard-* when you need flexible 6s/10s durations.
  • Use pro-* when you need fixed 1080p quality.
  • Image-to-video accepts exactly one image URL.
  • Result URLs may be temporary. Download outputs promptly after success.
For production workloads, prefer callback mode to reduce frequent polling.