nexusflow
Online
VIDEO / Video Generation

Video Generation API

Unified video generation interface supporting Wan, HappyHorse, PixVerse and more. Uses async invocation: first create a task to get a task_id, then poll for results. Video generation typically takes 1-5 minutes.

HTTP Call Flow

1
Create task → get task_id
POSThttps://nexusflow.vip/v1/tasks
2
Poll result by task_id
GEThttps://nexusflow.vip/v1/tasks/{task_id}

Supported Models

Model IDProviderMode720P Price1080P Price
wan2.6-t2vWan / AlibabaText-to-Video$0.09/sec$0.14/sec
wan2.6-i2vWan / AlibabaImage-to-Video$0.09/sec$0.14/sec
happyhorse-1.0-t2vHappyHorse / AlibabaText-to-Video$0.13/sec$0.23/sec
happyhorse-1.0-i2vHappyHorse / AlibabaImage-to-Video$0.13/sec$0.23/sec
pixverse-v6PixVerseText-to-Video$0.05 w/audio / $0.04 w/o audio$0.10 w/audio / $0.08 w/o audio

Billed by output video duration (e.g. 720P 5 seconds = unit price × 5). Only successful tasks are billed; failed tasks incur no charges.

Important Notes:
  • Video generation only supports async calls. After creating a task, use the id (task_id) to poll for results. Do not create duplicate tasks.
  • Suggested polling interval: 10-15 seconds, with exponential backoff on failure retries.
  • task_id query validity period: 24 hours. After timeout, results cannot be queried.
  • Video URL validity: 24 hours. Download immediately after retrieval.

Request Parameters

ParameterTypeRequiredDescription
modelstring*Model ID, see the Supported Models table above. e.g. wan2.6-t2v, happyhorse-1.0-i2v, pixverse-v6.
promptstring*Text prompt describing the desired video content. Supports English. Clearly specify 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 only support a subset.
durationinteger-Video duration in seconds, range [3, 15], default 5. Actual range depends on model.
img_urlstring-First-frame reference image URL (JPG/PNG/WEBP, ≤10MB). Required for Image-to-Video mode.
watermarkboolean-Add watermark, default true.
seedinteger-Random seed [0, 2147483647]. Fixed seed improves reproducibility.

Code Examples

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

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

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

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

Step 1 Response: Get task_id

On successful creation, returns task info. The id field serves as task_id 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 results. Valid for 24 hours.
objectFixed value "task".
statusInitial status is "running".
modelThe model ID used.
typeTask type, fixed as "video" for video generation.
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"

Successful Task

{
  "id": "task_0385dc79-5ff8-4d82-xxxx",
  "object": "task",
  "status": "succeeded",
  "model": "wan2.6-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"
}

Failed Task

{
  "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 → running → succeeded / failed.
progressintegerTask progress percentage 0-100.
output.video_urlstringGenerated video URL (returned only on success). MP4 format, link valid for 24 hours.
errorstringFailure reason (returned only on failure).
created_atstringTask creation time.
completed_atstringTask completion time (returned only in final state).
HappyHorse API
View HappyHorse model-specific API docs
Async Tasks API
View the general async tasks API docs
Full Pricing
View all model pricing