Happy Horse 1.0 API - T2V, I2V, R2V, Video Edit API: Pricing, Documentation
by Alibaba
Happy Horse 1.0 API allows for the creation of cinematic clips in high definition, supporting various professional workflows such as character-consistent generation and multilingual lip-syncing. Designed for high-speed performance, it enables developers to integrate rapid, high-fidelity video synthesis into third-party applications and creative tools.

Models Version
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
Happy Horse 1.0 API Documentation
https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseT2VRequest
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Video - Happy Horse API
Request Code
POST https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseT2VRequest
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A small cardboard train running through a tiny city at night"
}
import requests
url = "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseT2VRequest"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A small cardboard train running through a tiny city at night"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseT2VRequest';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'A small cardboard train running through a tiny city at night'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseT2VRequest" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A small cardboard train running through a tiny city at night"
}'
Output
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Text to Video
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | non-empty; ≤ 5000 latin chars / 2500 Chinese chars (truncated past) | Text description of the desired video |
| resolution | No | string | "1080P" | "720P", "1080P" | Output video resolution |
| ratio | No | string | "16:9" | "16:9", "9:16", "1:1", "4:3", "3:4" | Output aspect ratio |
| duration | No | integer | 5 | 3–15 (seconds) | Length of generated video in seconds |
| watermark | No | boolean | false | true, false | Add a "HappyHorse" watermark in the lower-right corner of the output |
| seed | No | integer | random | 0–2147483647 | Random seed for reproducibility. Note: same seed does not guarantee identical output (generation is probabilistic) |
Example Request
{
"prompt": "A small cardboard train running through a tiny city at night",
"resolution": "1080P",
"ratio": "16:9",
"duration": 15,
"watermark": false,
"seed": 42
}
Response
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'happy-horse-1-0' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-04-07T10:00:00.000Z",
"updated_at": "2026-04-07T10:02:30.000Z",
"completed_at": "2026-04-07T10:02:30.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Happy Horse 1.0 API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| 720P | 1s | |
| 1080P | 1s |
Happy Horse 1.0 API Documentation
https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseI2VRequest
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Video - Happy Horse API
Request Code
POST https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseI2VRequest
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"input": {
"media": [
{ "type": "first_frame", "url": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png" }
]
}
}
import requests
url = "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseI2VRequest"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"input": {
"media": [
{"type": "first_frame", "url": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png"}
]
}
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseI2VRequest';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
input: {
media: [
{ type: 'first_frame', url: 'https://cdn.translate.alibaba.com/r/wanx-demo-1.png' }
]
}
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseI2VRequest" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"input": {
"media": [
{ "type": "first_frame", "url": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png" }
]
}
}'
Output
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Image to Video
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
input | Yes | object | — | — | Container for prompt + media |
input.prompt | No | string | — | any language; ≤ 5000 latin chars / 2500 Chinese chars (truncated past) | Describe motion, not the subject — the image already provides the subject |
input.media | Yes | array | — | exactly 1 element | First-frame entry — see sub-fields below |
input.media[].type | Yes | string | — | "first_frame" | Only valid value for I2V |
input.media[].url | Yes | string | — | publicly reachable HTTP(S) URL of JPEG/JPG/PNG/WEBP. Min 300×300 px. Aspect 1:2.5 to 2.5:1. Max 10 MB | First frame image URL |
parameters | No | object | {} | — | Container for tuning options |
parameters.resolution | No | string | "1080P" | "720P", "1080P" | Output video resolution |
parameters.duration | No | integer | 5 | 3–15 (seconds) | Length of generated video in seconds |
parameters.watermark | No | boolean | false | true, false | Add a "HappyHorse" watermark in the lower-right corner of the output |
parameters.seed | No | integer | random | 0–2147483647 | Random seed for reproducibility. Note: same seed does not guarantee identical output (generation is probabilistic) |
Note: No ratio field for I2V — the output video's aspect ratio is
auto-derived from the input.media[].url image's dimensions.
Example Request
{
"input": {
"prompt": "A cat running on the grass",
"media": [
{ "type": "first_frame", "url": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png" }
]
},
"parameters": {
"resolution": "1080P",
"duration": 15,
"watermark": false,
"seed": 42
}
}
Response
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'happy-horse-1-0' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-04-07T10:00:00.000Z",
"updated_at": "2026-04-07T10:02:30.000Z",
"completed_at": "2026-04-07T10:02:30.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Happy Horse 1.0 API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| 720P | 1s | |
| 1080P | 1s |
Happy Horse 1.0 API Documentation
https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseR2VRequest
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Reference to Video - Happy Horse 1.0 API
Request Code
POST https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseR2VRequest
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"input": {
"prompt": "A woman in a red qipao character1",
"media": [
{ "type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/mvzfud/hh-v2v-girl.jpg" }
]
}
}
import requests
url = "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseR2VRequest"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"input": {
"prompt": "A woman in a red qipao character1",
"media": [
{"type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/mvzfud/hh-v2v-girl.jpg"}
]
}
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseR2VRequest';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
input: {
prompt: 'A woman in a red qipao character1',
media: [
{ type: 'reference_image', url: 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/mvzfud/hh-v2v-girl.jpg' }
]
}
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseR2VRequest" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"input": {
"prompt": "A woman in a red qipao character1",
"media": [
{ "type": "reference_image", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/mvzfud/hh-v2v-girl.jpg" }
]
}
}'
Output
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Reference to Video
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
input | Yes | object | — | — | Container for prompt + media. |
input.prompt | Yes | string | — | — | Describe the desired video. Use character1, character2, … tokens to reference images by their order in media. Max 5000 non-Chinese / 2500 Chinese characters (truncated past). |
input.media | Yes | array | — | — | Reference images. Array order maps to characterN tokens in the prompt. |
input.media[].type | Yes | string | — | — | Only valid value for R2V. |
input.media[].url | Yes | string | — | — | Publicly reachable image URL. Shortest side ≥ 400 px (720P+ recommended). Max 10 MB. |
parameters | No | object | {} | — | Container for tuning options. |
parameters.resolution | No | string | "1080P" | — | Output video resolution. |
parameters.ratio | No | string | "16:9" | — | Output aspect ratio. |
parameters.duration | No | integer | 5 | — | Length of generated video. |
parameters.watermark | No | boolean | false | true, false | Add “Happy Horse” watermark in the lower-right corner. |
parameters.seed | No | integer | random | — | Reproducibility hint (probabilistic — same seed does not guarantee identical output). |
characterN mapping
The order of items in input.media defines which characterN token in the prompt they map to. The first reference_image is character1, the second is character2, and so on up to character9. If your prompt mentions character3, you must have at least 3 entries in media.
Example Request
{
"input": {
"prompt": "A woman in a red qipao character1. Side medium view outlining the silhouette, then a low-angle shot capturing her gracefully unfolding a folding fan character2, with tassel earrings character3 swaying lightly as she turns her head.",
"media": [
{ "type": "reference_image", "url": "https://.../hh-v2v-girl.jpg" },
{ "type": "reference_image", "url": "https://.../hh-v2v2-folding-fan.jpg" },
{ "type": "reference_image", "url": "https://.../hh-v2v-earrings.jpg" }
]
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 15,
"watermark": false,
"seed": 42
}
}
Response
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'happy-horse-1-0' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-04-07T10:00:00.000Z",
"updated_at": "2026-04-07T10:02:30.000Z",
"completed_at": "2026-04-07T10:02:30.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Happy Horse 1.0 API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| 720P | 1s | |
| 1080P | 1s |
Happy Horse 1.0 API Documentation
https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseVideoEditRequest
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Video to Video - Happy Horse 1.0 API
Request Code
POST https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseVideoEditRequest
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"input": {
"prompt": "Make the video look like a Studio Ghibli scene",
"media": [
{ "type": "video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4" }
]
}
}
import requests
url = "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseVideoEditRequest"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"input": {
"prompt": "Make the video look like a Studio Ghibli scene",
"media": [
{"type": "video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4"}
]
}
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseVideoEditRequest';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
input: {
prompt: 'Make the video look like a Studio Ghibli scene',
media: [
{ type: 'video', url: 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4' }
]
}
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/happy-horse-1-0/v1/generateHappyhorseVideoEditRequest" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"input": {
"prompt": "Make the video look like a Studio Ghibli scene",
"media": [
{ "type": "video", "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260409/dozxak/Wan_Video_Edit_33_1.mp4" }
]
}
}'
Output
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Video to Video
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
input | Yes | object | — | — | Container for prompt + media. |
input.prompt | Yes | string | — | — | Describe the intended edit (style transfer, object/clothing replacement, etc.). Max 5000 non-Chinese / 2500 Chinese characters (truncated past). |
input.media | Yes | array | — | — | Source video plus optional reference images. |
input.media[].type | Yes | string | — | — | Element kind. |
input.media[].url (video) | Yes | string | — | — | Source video. |
input.media[].url (reference_image) | Conditional | string | — | — | Reference image. |
parameters | No | object | {} | — | Container for tuning options. |
parameters.resolution | No | string | "1080P" | — | Output video resolution. |
parameters.watermark | No | boolean | false | true, false | Add “Happy Horse” watermark in the lower-right corner. |
parameters.audio_setting | No | string | "auto" | — | auto lets the model decide; origin keeps the input video's audio track verbatim. |
parameters.seed | No | integer | random | — | Reproducibility hint (probabilistic — same seed does not guarantee identical output). |
Notes specific to video edit
- No
ratioorduration— both are derived from the input video. If the input is ≤ 15 s, output matches; if > 15 s, only the first 15 s are processed, so output is at most 15 s. - The input video must be publicly reachable (HTTP/HTTPS). DashScope downloads it directly — R2 / S3 / CDN URLs work;
localhost/ private URLs do not. - For reference-image-based replacements, describe in the prompt what to put where (e.g. “wear the sweater from image 1”). Array order maps to the order images appear in
media. - The
SUCCEEDEDresponse populatesusage.input_video_duration(source length actually processed) andusage.output_video_durationseparately — unlike T2V/I2V/R2V, whereinput_video_durationis always 0.
Example Request
{
"input": {
"prompt": "Make the horse-headed humanoid character in the video wear the striped sweater from image 1, place the prop from image 2 on the table behind, change the wall art to image 3, swap the floor texture to match image 4, and recolor the curtains to match image 5",
"media": [
{ "type": "video", "url": "https://.../source.mp4" },
{ "type": "reference_image", "url": "https://.../sweater.webp" },
{ "type": "reference_image", "url": "https://.../prop.jpg" },
{ "type": "reference_image", "url": "https://.../wall-art.png" },
{ "type": "reference_image", "url": "https://.../floor.jpg" },
{ "type": "reference_image", "url": "https://.../curtains.webp" }
]
},
"parameters": {
"resolution": "1080P",
"watermark": false,
"audio_setting": "origin",
"seed": 42
}
}
Response
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'happy-horse-1-0' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "happy-horse-1-0",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "happy-horse-1-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "happy-horse-1-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/happy-horse-1-0_019dxxxx-xxxx/output.mp4"
],
"media_type": "video/mp4"
},
"created_at": "2026-04-07T10:00:00.000Z",
"updated_at": "2026-04-07T10:02:30.000Z",
"completed_at": "2026-04-07T10:02:30.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Happy Horse 1.0 API Pricing
| Resolution | Duration | Price (USD) |
|---|---|---|
| 720P | 1s | |
| 1080P | 1s |