Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Hailuo 2.3 generates videos from text prompts or a single first-frame image. Use this page when you are ready to call the API after trying the model in the APIXO playground.
CapabilityValue
Model IDhailuo-2-3
Modesstandard-text-to-video, standard-image-to-video, pro-text-to-video, pro-image-to-video
PromptNon-empty string
Reference imagesExactly 1 URL for image-to-video modes
Output resolutionStandard modes: 768p; pro modes: 1080p
Output durationStandard modes: 6 or 10 seconds; pro modes: fixed 5 seconds
Result formatMP4 URL array in resultJson.resultUrls

Endpoint and authentication

Base URL:
https://api.apixo.ai/api/v1
MethodEndpointPurpose
POST/generateTask/hailuo-2-3Submit a generation task
GET/statusTask/hailuo-2-3?taskId={taskId}Poll task status and retrieve results
All requests require your APIXO API key:
Authorization: Bearer YOUR_API_KEY
Submit requests also require:
Content-Type: application/json

Copy-paste async quickstart

This minimal request submits a standard text-to-video task and returns a taskId.
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",
    "input": {
      "mode": "standard-text-to-video",
      "prompt": "a dramatic sunrise over a futuristic skyline with slow cinematic camera movement",
      "duration": 6
    }
  }'
Successful response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
Save the taskId; you need it to poll for the final result.

Poll for result

curl -X GET "https://api.apixo.ai/api/v1/statusTask/hailuo-2-3?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
Processing response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
Success response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965730929,
    "costTime": 120000
  }
}
Failed response:
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "PromptInvalid",
    "failMsg": "Prompt is invalid or rejected by provider",
    "createTime": 1767965610929,
    "completeTime": 1767965620132,
    "costTime": 9041
  }
}
Parse resultJson after state becomes success:
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;

Request body

Standard text-to-video

{
  "request_type": "async",
  "input": {
    "mode": "standard-text-to-video",
    "prompt": "a dramatic sunrise over a futuristic skyline with slow cinematic camera movement",
    "duration": 6
  }
}

Standard image-to-video

{
  "request_type": "async",
  "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": 10
  }
}

Pro text-to-video

{
  "request_type": "async",
  "input": {
    "mode": "pro-text-to-video",
    "prompt": "a premium commercial shot of a glass perfume bottle with elegant camera movement"
  }
}

Pro image-to-video

{
  "request_type": "async",
  "input": {
    "mode": "pro-image-to-video",
    "prompt": "smoothly animate this image with a subtle camera push-in and natural lighting variation",
    "image_urls": [
      "https://example.com/input.jpg"
    ]
  }
}

Parameters

request_type
string
default:"async"
Result delivery mode. Use async for polling with statusTask, or callback for webhook delivery.
callback_url
string
Required when request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.
input
object
required
Hailuo 2.3 input parameters.
ModeRequired mediaduration behaviorOutput
standard-text-to-videoNoneRequired: 6 or 10 seconds768p video
standard-image-to-videoExactly 1 image URLRequired: 6 or 10 seconds768p video
pro-text-to-videoNoneIgnoredFixed 5-second 1080p video
pro-image-to-videoExactly 1 image URLIgnoredFixed 5-second 1080p video
Image-to-video uses the provided image as the first frame. Use a direct JPG, JPEG, or PNG URL; upstream validation may reject images over 20MB, images whose short side is 300px or smaller, or images outside the 2:5 to 5:2 aspect-ratio range.

Response format

Submit task response

POST /generateTask/hailuo-2-3 returns a task ID when the task is accepted:
code
integer
API status code. 200 means the task was accepted.
message
string
Human-readable status message.
data.taskId
string
Unique task identifier used with the status endpoint.

Status response fields

taskId
string
Unique task identifier.
state
string
Current task state: processing, success, or failed.
resultJson
string
JSON string containing generated video URLs in resultUrls. Present when state is success.
failCode
string
Machine-readable failure code. Present when state is failed.
failMsg
string
Human-readable failure message. Present when state is failed.
createTime
integer
Task creation timestamp in Unix milliseconds.
completeTime
integer
Task completion timestamp in Unix milliseconds. Present after completion.
costTime
integer
Processing duration in milliseconds. Present after completion when timing data is available.

Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.
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/webhooks/apixo",
    "input": {
      "mode": "pro-image-to-video",
      "prompt": "animate this product image with a clean studio camera move",
      "image_urls": [
        "https://example.com/product.jpg"
      ]
    }
  }'
The callback payload mirrors the final status response shape with code, message, and data. See Webhooks for delivery requirements and retry behavior.

Billing

Hailuo 2.3 billing depends on the selected mode family.
Mode familyAPIXO priceBilling ruleExample charge
Standard modes$0.056 / secondduration * $0.0566s: $0.336; 10s: $0.56
Pro modes$0.49 / useFixed price per generationFixed 5-second output: $0.49
For current route and market comparison pricing, see Pricing.

Latency and polling

Actual latency may vary by prompt complexity, image accessibility, mode, provider queue load, and upstream processing time. The status response reports costTime in milliseconds after completion when timing data is available.
Mode familyOutput durationRecommended first pollPoll interval
Standard modes6s or 10s30s after task creation10s-15s
Pro modesFixed 5s45s-60s after task creation10s-15s
For high-concurrency production workloads, use callback mode to avoid frequent polling on long-running video tasks.
Rate limits and concurrency can vary by account, API key, and route. If you receive 429, slow down requests and retry with backoff. For account-level details, see System APIs.

Errors and troubleshooting

HTTP errors

CodeMeaningWhat to do
400Invalid request body, missing input, unsupported mode, invalid duration, or invalid image URL shapeFix the request before retrying
401Missing or invalid API keyCheck the Authorization header
402Insufficient balance or quotaAdd balance or switch account/key
403Key or route cannot access the modelCheck permissions and route strategy
429Rate limit or concurrency limit reachedRetry with exponential backoff
500Server error or unknown upstream failureRetry with backoff
502Upstream provider errorRetry with backoff
504Upstream timeoutRetry or use callback mode for long-running jobs

Validation notes

ConditionBackend behavior
Missing inputRequest fails before task creation
Missing or empty promptRequest fails before task creation
Unsupported modeRequest fails before task creation
Image mode without image_urlsRequest fails before task creation
image_urls contains 0 or more than 1 itemRequest fails before task creation
Standard mode without durationRequest fails before task creation
Standard mode with duration other than 6 or 10Request fails before task creation
Pro mode with durationduration is ignored

Task failure codes

Fail codeMeaningWhat to do
PromptInvalidPrompt was rejected or malformedAdjust the prompt and retry
SensitiveContent / InputOutputSensitiveContentDetectedPrompt, input image, or output failed content checksChange the prompt or input image
ImageFormatIncorrect / InvalidImageSizeInput image failed upstream image validationUse a public JPG/JPEG/PNG URL within the documented size and aspect-ratio limits
RateLimitedProvider-side rate limitRetry with exponential backoff
TimeoutProvider-side timeoutRetry, simplify the request, or use callback mode
Unknown errorProvider returned an unmapped failureRetry with backoff or contact support with the taskId
See Error Codes for the full error reference.