Pixazo APIModelsHappy Horse
Pixazo APIModelsHappy Horse

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.

Get API Key
Happy Horse API

Models Version

LIMITED TIME OFFER

Get $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync modePOST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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
promptYesstringnon-empty; ≤ 5000 latin chars / 2500 Chinese chars (truncated past)Text description of the desired video
resolutionNostring"1080P""720P", "1080P"Output video resolution
ratioNostring"16:9""16:9", "9:16", "1:1", "4:3", "3:4"Output aspect ratio
durationNointeger53–15 (seconds)Length of generated video in seconds
watermarkNobooleanfalsetrue, falseAdd a "HappyHorse" watermark in the lower-right corner of the output
seedNointegerrandom0–2147483647Random 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Happy Horse 1.0 API Pricing

30% OFFLimited time discount on API pricing
ResolutionDurationPrice (USD)
720P1s$0.14$0.098
1080P1s$0.24$0.168

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync modePOST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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
inputYesobjectContainer for prompt + media
input.promptNostringany language; ≤ 5000 latin chars / 2500 Chinese chars (truncated past)Describe motion, not the subject — the image already provides the subject
input.mediaYesarrayexactly 1 elementFirst-frame entry — see sub-fields below
input.media[].typeYesstring"first_frame"Only valid value for I2V
input.media[].urlYesstringpublicly reachable HTTP(S) URL of JPEG/JPG/PNG/WEBP. Min 300×300 px. Aspect 1:2.5 to 2.5:1. Max 10 MBFirst frame image URL
parametersNoobject{}Container for tuning options
parameters.resolutionNostring"1080P""720P", "1080P"Output video resolution
parameters.durationNointeger53–15 (seconds)Length of generated video in seconds
parameters.watermarkNobooleanfalsetrue, falseAdd a "HappyHorse" watermark in the lower-right corner of the output
parameters.seedNointegerrandom0–2147483647Random 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Happy Horse 1.0 API Pricing

30% OFFLimited time discount on API pricing
ResolutionDurationPrice (USD)
720P1s$0.14$0.098
1080P1s$0.24$0.168

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync modePOST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
inputYesobjectContainer for prompt + media.
input.promptYesstringDescribe 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.mediaYesarrayReference images. Array order maps to characterN tokens in the prompt.
input.media[].typeYesstringOnly valid value for R2V.
input.media[].urlYesstringPublicly reachable image URL. Shortest side ≥ 400 px (720P+ recommended). Max 10 MB.
parametersNoobject{}Container for tuning options.
parameters.resolutionNostring"1080P"Output video resolution.
parameters.ratioNostring"16:9"Output aspect ratio.
parameters.durationNointeger5Length of generated video.
parameters.watermarkNobooleanfalsetrue, falseAdd “Happy Horse” watermark in the lower-right corner.
parameters.seedNointegerrandomReproducibility 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Happy Horse 1.0 API Pricing

30% OFFLimited time discount on API pricing
ResolutionDurationPrice (USD)
720P1s$0.14$0.098
1080P1s$0.24$0.168

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync modePOST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
inputYesobjectContainer for prompt + media.
input.promptYesstringDescribe the intended edit (style transfer, object/clothing replacement, etc.). Max 5000 non-Chinese / 2500 Chinese characters (truncated past).
input.mediaYesarraySource video plus optional reference images.
input.media[].typeYesstringElement kind.
input.media[].url (video)YesstringSource video.
input.media[].url (reference_image)ConditionalstringReference image.
parametersNoobject{}Container for tuning options.
parameters.resolutionNostring"1080P"Output video resolution.
parameters.watermarkNobooleanfalsetrue, falseAdd “Happy Horse” watermark in the lower-right corner.
parameters.audio_settingNostring"auto"auto lets the model decide; origin keeps the input video's audio track verbatim.
parameters.seedNointegerrandomReproducibility hint (probabilistic — same seed does not guarantee identical output).

Notes specific to video edit

  • No ratio or duration — 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 SUCCEEDED response populates usage.input_video_duration (source length actually processed) and usage.output_video_duration separately — unlike T2V/I2V/R2V, where input_video_duration is 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Happy Horse 1.0 API Pricing

30% OFFLimited time discount on API pricing
ResolutionDurationPrice (USD)
720P1s$0.14$0.098
1080P1s$0.24$0.168