API Notes
happyhorse_1.0_i2v generates videos at 24fps in MP4 format and supports 720P and 1080P resolution for 3 to 15 seconds
happyhorse_1.0_i2v does not support ratio; the output aspect ratio follows the first frame image
Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key.
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
model string required
Model ID to use for the request
Value: happyhorse_1.0_i2v
input object required
Input parameters for the generation request
prompt
stringText prompt used to describe the generated video content. Supports Chinese and English. Chinese prompts support up to
2500characters, and non-Chinese prompts support up to5000characters. Content exceeding the limit is automatically truncatedExample:
The horse starts running forward through the field
media
arrayrequiredInput media array. Provide exactly one first-frame image
type
stringrequiredMedia type
Value:
first_frameurl
stringrequiredFirst-frame image URL or Base64-encoded image data
Image requirements:
Supported formats: JPEG, JPG, PNG, WEBP
Width and height: at least300pixels
Aspect ratio: from1:2.5to2.5:1
File size: maximum20MBInput formats:
Publicly accessible HTTP or HTTPS URL
Base64 format:data:{MIME_type};base64,{base64_data}
MIME types: JPEG/JPGimage/jpeg, PNGimage/png, WEBPimage/webpExample:
https://example.com/first-frame.jpg
parameters object
Generation parameters
resolution
stringVideo resolution. This parameter affects billing because different resolution tiers have different unit prices
Options:
720P,1080PDefault:
1080P
duration
integerVideo duration in seconds. Billing is based on successfully generated output video seconds, so this parameter affects cost
Range:
3-15Default:
5
watermark
booleanWhether to add a watermark to the lower-right corner of the generated video. The fixed watermark text is “Happy Horse”
Options:
true,falseDefault:
true
seed
integerRandom seed. If not specified, the system automatically generates a random seed. To improve reproducibility, use the same seed value for repeated calls
Range:
0-2147483647
Polling
Since result generation takes time, you need to poll the task status after creating the task.
The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.
See the examples on the right for polling requests and responses.
Response Format
error object
Error information, only present when status is failed
code
stringError code
message
stringDetailed error message
output array
Generation results, only present when status is completed
content
arrayList of generated resource content
type
stringResource type
Value:
image|videourl
stringProcessed resource URL
jobId
stringRemote task ID
usage object
Usage statistics, only present when status is completed
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information