Skip to content
中文

HappyHorse-1.1 API documentation

Integrate HappyHorse-1.1 with your VezAPI key. The operations below share the same authentication and account balance.

Base URL: https://api.vezapi.com
Send Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.

HappyHorse-1-1 image-to-video

POST/api/v1/jobs/createTask

Model IDs: happyhorse-1-1/image-to-video

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `happyhorse-1-1/image-to-video`.

Values: "happyhorse-1-1/image-to-video"

Default: "happyhorse-1-1/image-to-video"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the generation task.

input.prompt
optional
string

Describes the video content to generate. Supports any language. Maximum: 5,000 non-Chinese characters or 2,500 Chinese

Default: ""

maxLength: 5000

input.image_urls
required
array

The URL of the first frame image. Image constraints: 1. Formats: JPEG, JPG, PNG, WEBP. 2. Resolution: Width and height must both be at least 300 pixels. 3. Aspect ratio: Between 1:2.5 and 2.5:1. 4. File size: Up to 20 MB.

maxItems: 1

input.resolution
optional
string

The resolution of the generated video. Options: 720p; 1080p The output keeps the aspect ratio of the input image; 720p / 1080p set the resolution tier.

Values: "720p", "1080p"

Default: "1080p"

input.duration
optional
number

The duration of the generated video, in seconds. The value must be an integer in the range [3, 15]. Default: 5

Default: 5

minimum: 3

maximum: 15

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "happyhorse-1-1/image-to-video",
  "input": {
    "prompt": "",
    "image_urls": [
      "https://example.com/input.png"
    ],
    "resolution": "1080p",
    "duration": 5
  }
}'
Responses and errors

HTTP 200

Request Successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

HappyHorse-1-1 reference-to-video

POST/api/v1/jobs/createTask

Model IDs: happyhorse-1-1/reference-to-video

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `happyhorse-1-1/reference-to-video`.

Values: "happyhorse-1-1/reference-to-video"

Default: "happyhorse-1-1/reference-to-video"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the generation task.

input.prompt
required
string

A description of the desired elements and visual style for the generated video. Input in any language is supported. Up to 5,000 characters. Use "[Image 1]", "[Image 2]" to refer to the images in reference_image, in the same order. When using a reference, specify the object in the image, such as "the woman in a red qipao in [Image 1]".

maxLength: 5000

input.reference_image
required
array

The URL of a reference image. Image requirements: 1. Formats: JPEG, JPG, PNG, WEBP. 2. Resolution: The shortest side must be at least 400 pixels. A clear image with a resolution of 720P or higher is recommended. Avoid using images that are too small, blurry, or overly compressed, as this can degrade the output quality. 3. Maximum file size: 20 MB.

maxItems: 9

input.resolution
optional
string

The resolution tier of the generated video. Options: 720p; 1080p

Values: "720p", "1080p"

Default: "1080p"

input.aspect_ratio
optional
string

The aspect ratio of the generated video. Options: 16:9; 9:16; 3:4; 4:3; 4:5; 5:4; 1:1; 9:21; 21:9

Values: "16:9", "9:16", "3:4", "4:3", "4:5", "5:4", "1:1", "9:21", "21:9"

Default: "16:9"

input.duration
optional
number

The duration of the generated video, in seconds. Value range: An integer from 3 to 15.

Default: 5

minimum: 3

maximum: 15

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "happyhorse-1-1/reference-to-video",
  "input": {
    "prompt": "A cat running on the grass",
    "reference_image": [
      "https://example.com/input.png"
    ],
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 5
  }
}'
Responses and errors

HTTP 200

Request Successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

HappyHorse-1-1 text-to-video

POST/api/v1/jobs/createTask

Model IDs: happyhorse-1-1/text-to-video

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `happyhorse-1-1/text-to-video`.

Values: "happyhorse-1-1/text-to-video"

Default: "happyhorse-1-1/text-to-video"

callBackUrl
optional
string

The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation

input
required
object

Input parameters for the generation task.

input.prompt
required
string

Text description of the video to generate. Supports any language. Maximum 5,000 non-Chinese characters or 2,500 Chinese

maxLength: 5000

input.resolution
optional
string

Output video resolution. Options: 720p; 1080p

Values: "720p", "1080p"

Default: "1080p"

input.aspect_ratio
optional
string

Output video aspect ratio. Options: 16:9; 9:16; 1:1; 4:3; 3:4; 4:5; 5:4; 9:21; 21:9

Values: "16:9", "9:16", "1:1", "4:3", "3:4", "4:5", "5:4", "9:21", "21:9"

Default: "16:9"

input.duration
optional
number

Output video duration in seconds. Integer, 3–15. Default 5.

Default: 5

minimum: 3

maximum: 15

Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "happyhorse-1-1/text-to-video",
  "input": {
    "prompt": "A dog running on the earth",
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 5
  }
}'
Responses and errors

HTTP 200

Request Successful

ParameterTypeDescription & constraints
code
optional
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

Values: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description upon failure

data
required
object
data.taskId
required
string

The task ID can be used with the "Get Task Details" endpoint to query the task status.

Task status and callbacks

For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.

A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.

Files, logs and billing

Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.

Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.