HappyHorse 1.0 T2V API

HappyHorse 1.0 generates 720p or 1080p video from a text prompt.

POST /v1/videos/generations

Text-to-video: Only provide a prompt.

Request parameters

ParameterTypeRequiredDescription
modelstringYesThe model name to be called, fill in the name from the model gallery.
durationintegerYesVideo duration (seconds). ⚠️ Must be placed at the **top level**, and must match the actual value in input/parameters — values placed inside nested structures will not be read.
resolutionstringYesResolution, take 480p / 720p / 1080p. ⚠️ Must also be placed at the **top level**, and must match parameters.size.
inputobjectYesGeneration inputs in the model’s native format. See the input.* fields below for the required inputs for each use case.
parametersobjectNoPass the generation parameters in their native format. Common pixel sizes for size: 480p → 832 × 480; 720p → 1280 × 720; 1080p → 1920 × 1080.
aspect_ratiostringNoAspect ratio, e.g. 16:9 / 9:16
waitbooleanNotrue = block until result (up to 60 seconds), false/omitted = immediately return task_id and then poll yourself (recommended).
callback_urlstringNoCallback URL after task completion.
idempotency_keystringNoIdempotency key, repeated submissions with the same key return the same task and do not incur additional charges.
input.promptstringYesPrompt, describing the scene to be generated.
input.functionstringNoinput.function can be omitted — when omitted, automatically inferred from model name; when provided, uses the provided value.
parameters.sizestringNoPixel dimensions, e.g. 1280*720. Must be consistent with the top-level resolution.

Request example

curl https://api.router.ai/v1/videos/generations \
  -H "Authorization: Bearer sk-你的令牌" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "happyhorse-1.0-t2v",
    "duration": 5,
    "resolution": "720p",
    "input": {
      "prompt": "一只橘猫在窗台上伸懒腰,阳光洒进来"
    },
    "parameters": {"size": "1280*720"}
  }'

Endpoint reference: Aliyun Wan video generation