Documentation Index
Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
HappyHorse is an Alibaba video model for text-to-video, image-to-video, reference-guided video generation, and video editing. Use this page when you are ready to call the API after trying the model in the APIXO playground.| Capability | Value |
|---|---|
| Model ID | happyHorse |
| Modes | text-to-video, image-to-video, reference-to-video, video-edit |
| Prompt | Required for text-to-video, reference-to-video, and video-edit; optional for image-to-video |
| Prompt length | Up to 2500 characters |
| Input images | Exactly 1 URL for image-to-video; 1-9 URLs for reference-to-video; 0-5 optional reference image URLs for video-edit |
| Input videos | Exactly 1 URL for video-edit |
| Aspect ratios | 16:9, 9:16, 1:1, 4:3, 3:4 for text-to-video and reference-to-video |
| Resolution tiers | 720p, 1080p |
| Duration | 3-15 seconds for text-to-video, image-to-video, and reference-to-video |
video-edit, use audio_setting to choose automatic audio behavior or preserve the original input audio.
Endpoint and authentication
Base URL:| Method | Endpoint | Purpose |
|---|---|---|
POST | /generateTask/happyHorse | Submit a generation or edit task |
GET | /statusTask/happyHorse?taskId={taskId} | Poll task status and retrieve results |
Copy-paste async quickstart
This minimal request submits a text-to-video task and returns ataskId.
taskId; you need it to poll for the final video.
Poll for result
resultJson after state becomes success:
Request body
Text-to-video
Image-to-video
Reference-to-video
Video edit
Parameters
Result delivery mode. Use
async for polling with statusTask, or callback for webhook delivery.Required when
request_type is callback. Must be a public HTTPS URL that can receive the final task payload. See Webhooks.HappyHorse input parameters.
Response format
Submit task response
POST /generateTask/happyHorse returns a task ID when the task is accepted:
API status code.
200 means the task was accepted.Human-readable status message.
Unique task identifier used with the status endpoint.
Status response fields
Unique task identifier.
Current task state:
processing, success, or failed.JSON string containing generated video URLs in
resultUrls. Present when state is success.Machine-readable failure code. Present when
state is failed.Human-readable failure message. Present when
state is failed.Task creation timestamp in Unix milliseconds.
Task completion timestamp in Unix milliseconds. Present after completion.
Processing duration in milliseconds. Present after successful completion when available.
Webhook callback mode
Use callback mode when your backend should receive the final result automatically instead of polling.Billing
HappyHorse is billed per second. The selectedresolution determines the unit price.
| Resolution | APIXO official price | Market reference |
|---|---|---|
720p | $0.125 / second | $0.1625 / second |
1080p | $0.225 / second | $0.2875 / second |
| Mode | Formula |
|---|---|
text-to-video | duration * unitPrice |
image-to-video | duration * unitPrice |
reference-to-video | duration * unitPrice |
video-edit | (input video seconds + output video seconds) * unitPrice |
video-edit, the backend probes the input video duration and does not send a public duration parameter to the provider. Billing uses the input video seconds plus the generated output video seconds; APIXO caps the billable input side at 15 seconds, and the generated output side is billed at the same capped duration.
For current route and market comparison pricing, see Pricing.
Latency and polling
HappyHorse tasks are asynchronous. The backend does not enforce a fixed public latency SLA; actual time varies by mode, resolution, duration, prompt complexity, media fetch speed, and provider queue load.| Workflow | What affects latency | Recommended first poll | Poll interval |
|---|---|---|---|
text-to-video | Resolution, duration, prompt complexity, queue load | 30s after task creation | 10s |
image-to-video | Image fetch time, resolution, duration, queue load | 30s after task creation | 10s |
reference-to-video | Number of references, resolution, duration, queue load | 45s after task creation | 10s-15s |
video-edit | Input video fetch/probe time, input duration, references, queue load | 60s after task creation | 10s-15s |
429, slow down requests and retry with backoff. For account-level details, see System APIs.
Errors and troubleshooting
HTTP errors
| Code | Meaning | What to do |
|---|---|---|
400 | Invalid request body, mode, parameter, media URL shape, or provider rejection | Fix the request before retrying |
401 | Missing or invalid API key | Check the Authorization header |
402 | Insufficient balance or quota | Add balance or switch account/key |
403 | Key or route cannot access the model | Check permissions and route strategy |
429 | Rate limit or concurrency limit reached | Retry with exponential backoff |
500 | Server error | Retry with backoff |
502 | Upstream provider error | Retry with backoff |
504 | Upstream timeout | Retry or use callback mode for long-running jobs |
Task failure codes
| Fail code | Meaning | What to do |
|---|---|---|
PromptInvalid | Prompt was invalid or rejected by the provider | Rewrite the prompt with clearer, policy-safe instructions |
SensitiveContent / SensitiveContentDetected | Prompt, input media, or output failed safety checks | Change the prompt or media |
MissingParameter / BadRequest | Required mode-specific fields are missing or malformed | Check mode, prompt, image_urls, video_urls, resolution, ratio, and duration |
RateLimited / RateLimitExceeded | Provider or APIXO rate limit was reached | Retry with exponential backoff |
Timeout / Task TimeOut | The provider did not finish in time | Retry, reduce input complexity, or use callback mode |
Unknown error | Upstream failure could not be mapped to a known category | Retry with backoff or contact support with the taskId |
Troubleshooting tips
- Use public, direct, fetchable URLs for
image_urlsandvideo_urls. - For
image-to-video, send exactly one image URL. - For
reference-to-video, send 1-9 image URLs and include a non-empty prompt. - For
video-edit, send exactly one video URL. Optional reference images are limited to 5. - Use
ratioonly withtext-to-videoandreference-to-video. - Use
durationonly withtext-to-video,image-to-video, andreference-to-video;video-editduration is determined from the input video and billed as input video seconds plus output video seconds. - Store result URLs promptly if your application needs long-term access.