nexusflow
Online
HappyHorse / Alibaba

HappyHorse Video Generation API

HappyHorse text-to-video models generate physically realistic, smoothly animated video from a text prompt. The API is asynchronous: first create a task to get a task_id, then poll for the result. Video generation usually takes 1-5 minutes.

HTTP Call Flow

1
Create a task to get task_id
POSThttps://nexusflow.hk/v1/tasks
2
Poll the result by task_id
GEThttps://nexusflow.hk/v1/tasks/{task_id}
Note:
  • After successful creation, query the result using the returned id (the task_id). Do not recreate the task — just poll.
  • Poll at a recommended interval of 10-15 seconds.
  • task_id queries are valid for 24 hours; after that they cannot be queried.
  • Video URLs are valid for 24 hours; download and save them immediately.

Step 1: Create a Task

Model ID:happyhorse-1.0-t2v

Request Parameters

ParameterTypeRequiredDescription
modelstring*Fixed value: happyhorse-1.0-t2v
promptstring*Text prompt describing the video to generate. Supports English and Chinese, up to 2500 Chinese characters.
resolutionstring-Resolution tier: 720P (default) or 1080P. Affects billing: 720P $0.9/sec, 1080P $1.6/sec.
ratiostring-Aspect ratio. Options: 16:9 (default), 9:16, 1:1, 4:3, 3:4.
durationinteger-Video duration in seconds, range [3, 15], default 5.
watermarkboolean-Whether to add a watermark, default true.
seedinteger-Random seed [0, 2147483647]; fixing the seed improves reproducibility.

Request Example

curl -X POST 'https://nexusflow.hk/v1/tasks' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "happyhorse-1.0-t2v",
    "prompt": "A miniature city built from cardboard and bottle caps comes alive at night. A cardboard train slowly rolls past, dotted with tiny lights that illuminate the way ahead.",
    "resolution": "1080P",
    "ratio": "16:9",
    "duration": 5
  }'

Step 1 Response: Get task_id

On success, task information is returned; the id is the task_id used for subsequent queries.

{
  "id": "task_0385dc79-5ff8-4d82-xxxx",
  "object": "task",
  "status": "running",
  "model": "happyhorse-1.0-t2v",
  "type": "video",
  "created_at": "2026-06-01T10:00:00.000Z"
}
FieldDescription
idTask ID (task_id), used to query the result. Valid for 24 hours.
objectAlways "task".
statusInitial status is running.
modelThe model ID used.
typeTask type; always "video" for video generation.
created_atTask creation time (ISO 8601 format).

Step 2: Poll the Result by task_id

GEThttps://nexusflow.hk/v1/tasks/{task_id}

Query Request

curl https://nexusflow.hk/v1/tasks/task_0385dc79-5ff8-4d82-xxxx \
  -H "Authorization: Bearer $API_KEY"

Task Succeeded

{
  "id": "task_0385dc79-5ff8-4d82-xxxx",
  "object": "task",
  "status": "succeeded",
  "model": "happyhorse-1.0-t2v",
  "type": "video",
  "progress": 100,
  "output": {
    "video_url": "https://nexusflow.hk/storage/xxx.mp4"
  },
  "created_at": "2026-06-01T10:00:00.000Z",
  "completed_at": "2026-06-01T10:02:36.000Z"
}

Task Failed

{
  "id": "task_0385dc79-5ff8-4d82-xxxx",
  "object": "task",
  "status": "failed",
  "model": "happyhorse-1.0-t2v",
  "type": "video",
  "error": "InvalidParameter: The parameter is invalid.",
  "created_at": "2026-06-01T10:00:00.000Z",
  "completed_at": "2026-06-01T10:00:05.000Z"
}

Response Parameters

FieldTypeDescription
idstringTask ID.
statusstringTask status: pending (queued) → running (processing) → succeeded / failed.
progressintegerTask progress percentage, 0-100.
output.video_urlstringGenerated video URL (returned only when succeeded). MP4 format, link valid for 24 hours.
errorstringFailure reason (returned only when failed).
created_atstringTask creation time.
completed_atstringTask completion time (returned only in a terminal state).

Billing

ResolutionUnit PriceDescription
720P$0.9 / secBilled by output video duration (e.g. 5 sec = $4.5)
1080P$1.6 / secBilled by output video duration (e.g. 5 sec = $8.0)

Applies to all HappyHorse models (t2v / i2v / r2v / video-edit). Only successful tasks are billed; failed tasks are not charged.

HappyHorse Page
Model updates and capability details
Async Tasks API
General async task API documentation
Full Pricing
View pricing for all models