nexusflow
Online
HappyHorse / Alibaba

HappyHorse Video Generation API

HappyHorse Text-to-Video models generate physically realistic, smoothly animated video content from text prompts. The API uses asynchronous invocation: first create a task to get a task_id, then poll for the result. Video generation typically takes 1-5 minutes.

HTTP Invocation Workflow

1
Create task and get task_id
POSThttps://nexusflow.vip/v1/tasks
2
Poll result by task_id
GEThttps://nexusflow.vip/v1/tasks/{task_id}
Note:
  • After successful creation, use the returned id (i.e., task_id) to query results. Do not create duplicate tasks; just poll to retrieve results.
  • Polling recommended interval 10-15 seconds.
  • task_id query validity period 24 hours; it cannot be queried after expiration.
  • Video URL validity period 24 hours; please download and save immediately after retrieval.

Step 1: Create Task

Model ID:happyhorse-1.0-t2v

Request Parameters

ParametersTypeRequiredDescription
modelstring*Fixed value: happyhorse-1.0-t2v
promptstring*Text prompt, describing the desired video content. Supports Chinese and English, 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. Available values: 16:9 (default), 9:16, 1:1, 4:3, 3:4.
durationinteger-Video duration (seconds), range [3, 15], default 5.
watermarkboolean-Add watermark, default true.
seedinteger-Random seed [0, 2147483647]; fixed seed improves reproducibility.

Request Example

curl -X POST 'https://nexusflow.vip/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 passes through, small lights dotting the path, illuminating the way.",
    "resolution": "1080P",
    "ratio": "16:9",
    "duration": 5
  }'

Step 1 Response: Get task_id

After successful creation, task information is returned. The id serves as the task_id 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 for querying results. Valid for 24 hours.
objectFixed value "task".
statusInitial status is running.
modelThe model ID used.
typeTask type; video generation is always "video".
created_atTask creation time (ISO 8601 format).

Step 2: Poll Result by task_id

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

Query Request

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

Task Execution Succeeded

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

Task Execution 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 (only returned on success). MP4 format, link valid for 24 hours.
errorstringFailure reason (only returned on failure).
created_atstringTask creation time.
completed_atstringTask completion time (only returned for final states).

Billing Details

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 Overview
View model features and capability descriptions
Async Tasks API
View the general Async Tasks API documentation
Full Pricing
View pricing for all models