Developer Docs/HappyHorse Video API

HappyHorse Video API

Build HappyHorse Video integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

Overview

Asynchronous video generation powered by HappyHorse models on Alibaba DashScope. Supports HappyHorse 1.0 and 1.1 for text-to-video, image-to-video, and reference-to-video; video-edit remains on HappyHorse 1.0. HappyHorse 1.1 generation supports 480P, 720P, or 1080P; 1.0 and video-edit support 720P or 1080P.

Primary Endpoint

POST/api/v1/userHappyhorseVideo/start

Start HappyHorse video generation task (T2V / I2V / R2V / Video-Edit)

Request Parameters

NameTypeRequiredDescription
modeenum: t2v | i2v | r2v | video-editYesGeneration mode
namestringNoTask name
model_versionenum: 1.0 | 1.1NoModel version for t2v / i2v / r2v. video-edit always uses 1.0. HappyHorse 1.0 keeps the legacy duration/ratio options; 1.1 supports 3-15s, additional aspect ratios, and 480P/720P/1080P.
promptstringNoRequired for t2v / r2v / video-edit; optional for i2v
image_urlstringNoFirst frame image URL (i2v only)
reference_image_urlsarray<string>NoReference images (r2v requires 1-9; video-edit allows 0-5)
edit_video_urlstringNoInput video URL (video-edit only)
input_video_secondsnumberNoFrontend-detected input video duration in seconds (used to estimate coins for video-edit)
durationenum: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15NoOutput duration (seconds). model_version=1.0 supports 5/10/15; model_version=1.1 supports 3-15. Ignored for video-edit (decided by input video).
resolutionenum: 480P | 720P | 1080PNoOutput resolution. 480P is only supported by HappyHorse 1.1 t2v / i2v / r2v; 1.0 and video-edit support 720P / 1080P.
ratioenum: 16:9 | 9:16 | 1:1 | 4:3 | 3:4 | 4:5 | 5:4 | 9:21 | 21:9NoAspect ratio (t2v / r2v only). model_version=1.0 supports 16:9, 9:16, 1:1, 4:3, 3:4; model_version=1.1 also supports 4:5, 5:4, 9:21, 21:9.
audio_settingenum: auto | originNoAudio control (video-edit only). auto = model decides; origin = keep input video audio.
seedintegerNoRandom seed [0, 2147483647]
watermarkbooleanNoDashScope watermark switch
minor_suspected_skipbooleanNo-
webhook_urlstringNoHTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.
webhook_tokenstringNoOptional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.

Request Example

curl -X POST "https://www.a2e.com.cn/api/v1/userHappyhorseVideo/start" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "t2v",
  "name": "My generation task",
  "model_version": "1.0",
  "prompt": "A cinematic scene with natural motion",
  "image_url": "https://example.com/reference.jpg",
  "reference_image_urls": "https://example.com/reference.jpg",
  "edit_video_url": "https://example.com/reference.jpg",
  "input_video_seconds": 1,
  "duration": "5",
  "resolution": "720P",
  "ratio": "16:9",
  "audio_setting": "auto"
}'

Related Endpoints

POST/api/v1/userHappyhorseVideo/start

Start HappyHorse video generation task (T2V / I2V / R2V / Video-Edit)

GET/api/v1/userHappyhorseVideo/allRecords

List HappyHorse tasks

POST/api/v1/userHappyhorseVideo/batchDetail

Batch query task details

GET/api/v1/userHappyhorseVideo/{_id}

Get HappyHorse task details

DELETE/api/v1/userHappyhorseVideo/{_id}

Delete a HappyHorse task

Responses

200

Task created successfully

401

Unauthorized - Invalid or missing bearer token