nexusflow
Online
VIDEO / Video Generation

Video Generation API

Unified video generation API supporting multiple models including Wan, HappyHorse, and PixVerse. 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}

Supported Models

Model IDProviderMode720P Unit Price1080P Unit Price
wan2.6-t2vWan / AlibabaText-to-Video$0.6 / sec$1 / sec
wan2.6-i2vWan / AlibabaImage-to-Video$0.6 / sec$1 / sec
happyhorse-1.0-t2vHappyHorse / AlibabaText-to-Video$0.9 / sec$1.6 / sec
happyhorse-1.0-i2vHappyHorse / AlibabaImage-to-Video$0.9 / sec$1.6 / sec
pixverse-v6PixVerseText-to-Video$0.36 with audio / $0.27 silent$0.68 with audio / $0.53 silent

Billed by output video duration (e.g. 720P 5 sec = unit price x 5). Only successful tasks are billed; failed tasks are not charged.

Notes:
  • Video generation is asynchronous only; there is no synchronous endpoint. After creating a task, poll the result using the id (the task_id). Do not recreate the task.
  • Poll at a recommended interval of 10-15 seconds, and use exponential backoff for retries.
  • 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.

Request Parameters

ParameterTypeRequiredDescription
modelstring*Video model ID, see the Supported Models table above. For example wan2.6-t2v, happyhorse-1.0-i2v, pixverse-v6.
promptstring*Text prompt describing the video to generate. Supports English and Chinese; clearly state the subject, action, camera, and style.
resolutionstring-Resolution tier: 720P (default) or 1080P. Different tiers have different pricing.
ratiostring-Aspect ratio. Options: 16:9 (default), 9:16, 1:1, 4:3, 3:4. Some models may support only a subset.
durationinteger-Video duration in seconds, range [3, 15], default 5. The exact range depends on the model.
img_urlstring-First-frame reference image URL (JPG/PNG/WEBP, ≤10MB). Required in image-to-video mode.
watermarkboolean-Whether to add a watermark, default true.
seedinteger-Random seed [0, 2147483647]; fixing the seed improves reproducibility.

Code Examples

# Step 1: Create the text-to-video task
curl -X POST 'https://nexusflow.hk/v1/tasks' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan2.6-t2v",
    "prompt": "City coastline at dusk, slow dolly-in, cinematic natural light, refined realistic style",
    "resolution": "1080P",
    "ratio": "16:9",
    "duration": 5
  }'

# Returns → { "id": "task_abc123...", "status": "running", ... }

# Step 2: Poll for the result (recommended interval 10-15 seconds)
curl https://nexusflow.hk/v1/tasks/task_abc123 \
  -H "Authorization: Bearer $API_KEY"

# Returns → { "status": "succeeded", "output": { "video_url": "https://..." }, ... }

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": "wan2.6-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": "wan2.6-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": "wan2.6-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).
HappyHorse API
View the HappyHorse model-specific API docs
Async Tasks API
General async task API documentation
Full Pricing
View pricing for all models