Happy Horse API Tutorial
Happy Horse is a video generation model on UniAll AI for creating short AI videos from text prompts, a single reference image, or multiple reference images. The public model id is `happy-horse-720p`.
It supports asynchronous video generation through the `/v1/videos/generations` endpoint, making it suitable for applications that need to submit a job, wait for processing, and retrieve the generated video when ready.
What Happy Horse Can Do
Happy Horse supports three main generation modes:
- `text_to_video`: generate a video from a text prompt.
- `reference_image_to_video`: generate a video using one reference image plus a prompt.
- `reference_media_to_video`: generate a video with reference media inputs, including multiple reference images when supported by the request.
The model is useful for short-form video素材, product reveals, ecommerce visuals, advertising concepts, social media clips, storyboards, and creative prototyping. It can output 720p or 1080p video, with durations from 3 to 15 seconds.
Key Parameters
The required parameters are:
- `model`: use `happy-horse-720p` for the 720p model.
- `prompt`: describe the video scene, motion, subject, style, camera behavior, and lighting.
- `duration`: choose a value from 3 to 15 seconds.
Common optional parameters include:
- `generation_mode`: for example `text_to_video`, `reference_image_to_video`, or `reference_media_to_video`.
- `image_url`: a single reference image for image-to-video workflows.
- `reference_image_urls`: an array of 1 to 9 reference images.
- `aspect_ratio`: `16:9`, `9:16`, `1:1`, `4:3`, or `3:4`.
- `resolution`: `720p` or `1080p`.
- `video_count`: fixed at 1 video per generation.
Example API Request
```bash curl -X POST "https://api.uniall.ai/v1/videos/generations" \ -H "Authorization: Bearer $UNIALL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "happy-horse-720p", "generation_mode": "text_to_video", "prompt": "A cinematic product reveal of a matte black smartwatch on a reflective surface, soft studio lighting, slow push-in camera movement.", "duration": 5, "aspect_ratio": "16:9", "resolution": "720p", "video_count": 1 }' ```
For image-to-video, include `image_url` and use `reference_image_to_video`:
```json { "model": "happy-horse-720p", "generation_mode": "reference_image_to_video", "prompt": "Animate the product with a smooth rotating camera move and premium studio lighting.", "image_url": "https://example.com/reference.png", "duration": 5, "aspect_ratio": "16:9", "resolution": "720p" } ```
Pricing Angle
Happy Horse is billed per second of generated video. On UniAll AI, the listed user price for 720p is $0.0952 per second, while 1080p is $0.1904 per second. A 5-second 720p generation would therefore be estimated at about $0.476 before any account-specific adjustments.
Because the billing unit is seconds, cost planning is straightforward: choose the duration and resolution first, then multiply by the per-second rate. Failed generations are marked as refundable when failure refunding applies.
Best Practices
Write prompts that include the subject, scene, motion, camera direction, lighting, and intended use. For commercial video assets, specify practical details such as product angle, background, pacing, and format. For vertical social clips, use `9:16`; for web and presentation assets, use `16:9`.
Use 720p for faster iteration and concept testing. Move to 1080p when the visual direction is approved or when the output is intended for higher-quality publishing.
常见问题
What is the Happy Horse API used for?
The Happy Horse API is used to generate short AI videos from text prompts, a single reference image, or multiple reference images. It is suitable for product videos, ads, ecommerce assets, social clips, and automated creative workflows.
What model id should I use for Happy Horse on UniAll AI?
Use the public model id `happy-horse-720p` when calling the 720p Happy Horse model through the UniAll AI video generation endpoint.
How is Happy Horse priced?
Happy Horse is billed per second of generated video. The listed user price is $0.0952 per second for 720p and $0.1904 per second for 1080p, with the final cost depending on duration and selected resolution.