BeeRoute logoBeeRoute.

Home / Docs / HappyHorse 1.0 Video Generation API Documentation

HappyHorse 1.0 Video Generation API Documentation

Call the BeeRoute video generation API to generate video content. This document applies to the HappyHorse 1.0 series of video generation models (text-to-video, image-to-video, reference-to-video, video editing).

Download the MD file of this document


1. Supported Models

Model List

Model NameTypeDescription
happyhorse-1.1-t2vText-to-videoGenerates physically realistic, smoothly moving videos from text prompts
happyhorse-1.1-i2vImage-to-videoGenerates a video based on a first-frame image combined with a text description
happyhorse-1.1-r2vReference-to-videoTakes multiple reference images and fuses the subjects according to the text prompt to generate a video
happyhorse-1.0-video-editVideo editingTakes a video and reference images, and combines them with text instructions to perform editing tasks such as style transformation and local replacement

Pricing

Text-to-video / Image-to-video / Reference-to-video / Video editing

ResolutionPrice (USD)
720P$0.0993 / sec
1080P$0.1765 / sec

Billing notes:

  • Text-to-video: billed by the output video duration.
  • Image-to-video: billed by the output video duration.
  • Reference-to-video: billed by duration (the input_video_duration for reference-to-video is fixed at 0, i.e. equivalent to billing by the output video duration).
  • Video editing: billed by duration (input video duration + output video duration).

2. Generating Videos

Because video generation tasks take a relatively long time (typically 1–5 minutes), the API uses asynchronous calls. The whole flow consists of two core steps: "create task → poll for result".

API Endpoint

POST /v1/videos

Request Headers

ParameterTypeRequiredDescription
AuthorizationstringYesUser authentication token (Bearer sk-xxxx)
Content-TypestringYesapplication/json

Request Parameters (JSON Body)

ParameterTypeRequiredDescription
modelstringYesModel name. See the model list above for valid values.
inputobjectYesInput information, including the prompt and media materials. See input parameters below.
parametersobjectNoVideo generation parameters such as resolution and duration. See parameters below.

input parameters

Common fields

ParameterTypeRequiredDescription
promptstringConditionalText prompt. Describes the video content and visual characteristics you expect.
Supports any language input, with a maximum of 5000 non-Chinese characters or 2500 Chinese characters; anything beyond is automatically truncated.
Text-to-video: required.
Image-to-video: optional.
Reference-to-video: required.
Video editing: required.
mediaarrayConditionalList of media materials; each element contains the type and url fields.
Text-to-video: omit (pure text generation).
Image-to-video / Reference-to-video / Video editing: required.

media element structure

The valid values of type differ by model:

Image-to-video (happyhorse-1.1-i2v)

type valueDescription
first_frameFirst-frame image (required, exactly 1)

Reference-to-video (happyhorse-1.1-r2v)

type valueDescription
reference_imageReference image (required, 1–9)

Character reference note: in the prompt, use [Image 1], [Image 2] markers to refer to the reference images at the corresponding positions in the media array, in the same order as the media array. When using them, specify the concrete object in the reference image, for example "the woman wearing a red qipao in [Image 1]".

Video editing (happyhorse-1.0-video-edit)

type valueDescription
videoThe video to be edited (required, exactly 1)
reference_imageReference image (optional, 0–5)

Media material limits

Applicable scenarioMaterial typeFormatResolutionDuration/Frame rateSize
Image-to-video first_frameImageJPEG, JPG, PNG, WEBPWidth and height ≥ 300 px, aspect ratio 1:2.5–2.5:1—≤ 10MB
Reference-to-video reference_imageImageJPEG, JPG, PNG, WEBPShort side ≥ 400 px (720P or above recommended)—≤ 10MB
Video editing reference_imageImageJPEG, JPG, PNG, WEBPWidth and height ≥ 300 px, aspect ratio 1:2.5–2.5:1—≤ 10MB
Video editing videoVideoMP4, MOV (H.264 encoding recommended)Long side ≤ 2160 px, short side ≥ 320 px, aspect ratio 1:2.5–2.5:1Duration 3–60s, frame rate > 8fps≤ 100MB

parameters

ParameterTypeApplicable modelsRequiredDescription
resolutionstringAllNoResolution tier, which directly affects the cost.
Valid values: 720P, 1080P (default).
ratiostringt2v / r2vNoVideo aspect ratio.
Valid values: 16:9 (default), 9:16, 1:1, 4:3, 3:4.
Note: image-to-video automatically matches the aspect ratio of the input first frame, so this parameter is not needed; video editing does not support this parameter, and the output keeps the same ratio as the input video.
durationintegert2v / i2v / r2vNoVideo duration (seconds), which directly affects the cost. An integer in [3, 15], default 5.
Note: video editing does not support this parameter; the output video duration matches the input video. When the input exceeds 15 seconds, the first 15 seconds are automatically taken, and the maximum output is 15 seconds.
watermarkbooleanAllNoWhether to add a watermark.
true (default): adds a "Happy Horse" watermark in the bottom-right corner. false: no watermark.
seedintegerAllNoRandom seed, in [0, 2147483647].
If omitted, the system generates one automatically. A fixed seed improves reproducibility but does not guarantee identical results.
audio_settingstringvideo-editNoVideo audio setting (video editing only).
auto (default): controlled by the model. origin: keep the original audio of the input video.

Output video resolution by ratio and resolution

Resolution tierAspect ratioOutput video resolution (width*height)
720P16:91280*720
9:16720*1280
1:1960*960
4:31104*832
3:4832*1104
1080P16:91920*1080
9:161080*1920
1:11440*1440
4:31648*1248
3:41248*1648

Request Examples

1. Text-to-video

curl --location --request POST 'https://beeroute.ai/v1/videos' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "happyhorse-1.1-t2v",
    "input": {
        "prompt": "A kitten running under the moonlight"
    },
    "parameters": {
        "resolution": "720P",
        "ratio": "16:9",
        "duration": 5,
        "watermark": false
    }
}'

2. Image-to-video - first frame to video

curl --location --request POST 'https://beeroute.ai/v1/videos' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "happyhorse-1.1-i2v",
    "input": {
        "prompt": "A cat running on the grass",
        "media": [
            {
                "type": "first_frame",
                "url": "https://example.com/first_frame.png"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "duration": 5,
        "watermark": false
    }
}'

3. Reference-to-video - multiple image references

curl --location --request POST 'https://beeroute.ai/v1/videos' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "happyhorse-1.1-r2v",
    "input": {
        "prompt": "The woman in a red qipao from [Image 1] gently raises her hand to open the folding fan from [Image 2], while the tassel earrings from [Image 3] sway lightly as she turns her head.",
        "media": [
            {
                "type": "reference_image",
                "url": "https://example.com/girl.jpg"
            },
            {
                "type": "reference_image",
                "url": "https://example.com/folding-fan.jpg"
            },
            {
                "type": "reference_image",
                "url": "https://example.com/earrings.jpg"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "ratio": "16:9",
        "duration": 5,
        "watermark": false
    }
}'

4. Video editing - style modification

curl --location --request POST 'https://beeroute.ai/v1/videos' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "happyhorse-1.0-video-edit",
    "input": {
        "prompt": "Convert the entire scene into claymation style",
        "media": [
            {
                "type": "video",
                "url": "https://example.com/input_video.mp4"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "watermark": false
    }
}'

5. Video editing - reference image editing

curl --location --request POST 'https://beeroute.ai/v1/videos' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "happyhorse-1.0-video-edit",
    "input": {
        "prompt": "Replace the clothes of the girl in the video with the clothes in the image",
        "media": [
            {
                "type": "video",
                "url": "https://example.com/input_video.mp4"
            },
            {
                "type": "reference_image",
                "url": "https://example.com/clothes.png"
            }
        ]
    },
    "parameters": {
        "resolution": "720P",
        "watermark": false
    }
}'

Response Format

200 - Submission succeeded

{
    "id": "task_20260124220030-9s4dc"
}

Note: Please save the id, which is used to poll the task status and result. Do not create duplicate tasks.

Error response

{
    "code": "InvalidApiKey",
    "message": "No API-key provided.",
    "request_id": "7438d53d-6eb8-4596-8835-xxxxxx"
}

3. Querying Task Status

Video generation usually takes several minutes. Poll the status using the task ID, with a recommended interval of 15 seconds.

API Endpoint

GET /v1/videos/{video_id}

Path Parameters

ParameterTypeRequiredDescription
video_idstringYesThe id returned when creating the task

Request Example

curl --location --request GET 'https://beeroute.ai/v1/videos/task_20260124220030-9s4dc' \
--header 'Authorization: Bearer sk-xxx'

Response Format

200 - Completed successfully (completed)

{
    "id": "task_20260124220030-9s4dc",
    "object": "video.generation",
    "model": "happyhorse-1.1-t2v",
    "status": "completed",
    "progress": "100%",
    "created_at": 1769263230,
    "started_at": 1769263245,
    "completed_at": 1769263322,
    "video_url": "https://example.com/output_video.mp4"
}

Processing (processing)

{
    "id": "task_20260124220030-9s4dc",
    "object": "video.generation",
    "model": "happyhorse-1.1-t2v",
    "status": "processing",
    "progress": "50%",
    "created_at": 1769263230,
    "started_at": 1769263245
}

Queued (queued)

{
    "id": "task_20260124220030-9s4dc",
    "object": "video.generation",
    "model": "happyhorse-1.1-t2v",
    "status": "queued",
    "progress": "0%",
    "created_at": 1769263230
}

Failed (failed)

{
    "id": "task_20260124220030-9s4dc",
    "object": "video.generation",
    "model": "happyhorse-1.1-t2v",
    "status": "failed",
    "progress": "0%",
    "created_at": 1769263230,
    "started_at": 1769263245,
    "completed_at": 1769263322
}

Response Field Descriptions

FieldTypeDescription
idstringTask ID.
objectstringFixed value video.generation.
modelstringThe model name used.
statusstringTask status:
queued: queued
processing: processing
completed: completed
failed: failed
progressstringGeneration progress percentage (e.g. "100%").
created_atintegerTask creation time (Unix timestamp).
started_atintegerTask start time (Unix timestamp).
completed_atintegerTask completion time (Unix timestamp).
video_urlstringVideo download link (MP4, H.264 encoding). Returned only when status is completed. Valid for 24 hours; please download promptly.

4. Detailed Parameters per Model

1. Text-to-video (happyhorse-1.1-t2v)

Generates a video from text prompts.

FeatureDescription
prompt length≤ 5000 non-Chinese characters or 2500 Chinese characters (required)
Resolution720P, 1080P (default)
Aspect ratio16:9 (default), 9:16, 1:1, 4:3, 3:4
Duration[3, 15] seconds, default 5

2. Image-to-video (happyhorse-1.1-i2v)

Generates a video based on the input first-frame image.

FeatureDescription
prompt length≤ 5000 non-Chinese characters or 2500 Chinese characters (optional)
Resolution720P, 1080P (default)
Aspect ratioAutomatically matches the input first frame; no need to specify manually
Duration[3, 15] seconds, default 5
First frame1 first_frame type image required

3. Reference-to-video (happyhorse-1.1-r2v)

Takes multiple reference images and fuses the subjects to generate a video.

FeatureDescription
prompt length≤ 5000 non-Chinese characters or 2500 Chinese characters (required)
Resolution720P, 1080P (default)
Aspect ratio16:9 (default), 9:16, 1:1, 4:3, 3:4
Duration[3, 15] seconds, default 5
Reference materials1–9 reference_image
Character referenceUse [Image 1], [Image 2] in the prompt to reference the corresponding reference images in the order of the media array

4. Video editing (happyhorse-1.0-video-edit)

Takes a video and reference images and performs editing tasks such as style transformation and local replacement according to the instructions.

FeatureDescription
prompt length≤ 5000 non-Chinese characters or 2500 Chinese characters (required)
Resolution720P, 1080P (default)
Aspect ratioCannot be specified manually; the output matches the input video
Output duration3–15 seconds; matches the input video. When the input exceeds 15 seconds, the first 15 seconds are automatically taken
Input video1 video type material required
Reference imagesOptional, 0–5 reference_image
Audio controlaudio_setting: auto (default) or origin (keep the original audio)

5. FAQ

Q: What is the relationship between resolution and ratio?

A: Both are optional parameters. resolution controls the clarity tier (affecting cost), and ratio controls the aspect ratio. Passing both is recommended for precise control of the output video specifications. The image-to-video model does not require ratio; the model automatically matches the aspect ratio of the input material.

Q: How is the output resolution of image-to-video determined?

A: The model automatically scales to a similar total pixel count based on the selected resolution tier, and the video aspect ratio will be as close as possible to that of the input image. The actual output may differ slightly (the video width and height must be multiples of 16).

Q: What does the order of the media array mean in reference-to-video?

A: The 1st reference_image in the media array corresponds to [Image 1] in the prompt, the 2nd corresponds to [Image 2], and so on. When using them, clearly refer to the concrete object in the reference image in the prompt, such as "the woman wearing a red qipao in [Image 1]".

Q: How is the output duration of video editing determined?

A: Video editing does not support specifying the output duration via the duration parameter; the output video duration matches the input video. When the input video exceeds 15 seconds, the system automatically takes the first 15 seconds from the start as the valid segment, so the maximum output is 15 seconds.

Q: Is the watermark enabled by default?

A: Yes. The HappyHorse series models add a "Happy Horse" watermark in the bottom-right corner of the video by default. To disable it, explicitly set "watermark": false in parameters.

A: It cannot be converted directly. The correct approach is for the backend service to download the video file after obtaining the URL, then upload it to a permanent object storage service to generate a new permanent access link.

Last updated 2026-11-29 · Markdown source · llms.txt