Apariencia
HappyHorse
HappyHorse video generation with text-to-video, image-to-video, reference, and edit modes.
API surface
| Operation | Endpoint | Mode |
|---|---|---|
| Video generation task | POST /v1/async/videos/generations | Async only |
Models
| Model id | Notes |
|---|---|
happyhorse-1.0 | Text-to-video and image-to-video. Also supports reference-to-video / video-edit via providerOptions. seconds 3–15. |
Pricing
Billed as n × seconds × rate(resolution) credits. Default resolution is 1080p.
| Model | 720p | 1080p |
|---|---|---|
happyhorse-1.0 | 13/sec | 23/sec |
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | happyhorse-1.0. |
prompt | string | Yes | 1–2000 characters. |
seconds | integer | Yes | 3–15. |
resolution | string | No | 720p or 1080p (default). |
n | integer | No | Default 1. |
image | string | string[] | No | Public http(s) image URL for image-to-video. |
providerOptions | object | No | Optional model extensions. See providerOptions below. |
providerOptions
| Field | Type | Description |
|---|---|---|
aspect_ratio | string | 16:9 / 9:16 / 1:1 / 4:3 / 3:4. |
action | string | Generation mode: text-to-video / image-to-video / reference-to-video / video-edit. |
reference_images | array | Reference images for reference-to-video. |
image_with_roles | object[] | Role-tagged reference images when needed. |
url | string | Source video URL for video-edit. |
audio_setting | string | Edit audio handling: auto or origin. |
seed | integer | Random seed for more reproducible results. |
watermark | boolean | Whether to add a watermark. |
Example
bash
curl https://api.pixapi.ai/v1/async/videos/generations \
-H "Authorization: Bearer $PIXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.0",
"prompt": "A soft product reveal with gentle camera orbit",
"n": 1,
"seconds": 5,
"resolution": "1080p",
"providerOptions": {
"aspect_ratio": "16:9",
"action": "text-to-video"
}
}'py
import os
import requests
response = requests.post(
"https://api.pixapi.ai/v1/async/videos/generations",
headers={
"Authorization": f"Bearer {os.environ['PIXAPI_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "happyhorse-1.0",
"prompt": "A soft product reveal with gentle camera orbit",
"n": 1,
"seconds": 5,
"resolution": "1080p",
"providerOptions": {
"aspect_ratio": "16:9",
"action": "text-to-video"
}
},
)
response.raise_for_status()
task = response.json()
print(task["id"])js
const response = await fetch('https://api.pixapi.ai/v1/async/videos/generations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PIXAPI_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "happyhorse-1.0",
"prompt": "A soft product reveal with gentle camera orbit",
"n": 1,
"seconds": 5,
"resolution": "1080p",
"providerOptions": {
"aspect_ratio": "16:9",
"action": "text-to-video"
}
}),
});
if (!response.ok) {
throw new Error(await response.text());
}
const task = await response.json();
console.log(task.id);go
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"model": "happyhorse-1.0",
"prompt": "A soft product reveal with gentle camera orbit",
"n": 1,
"seconds": 5,
"resolution": "1080p",
"providerOptions": {
"aspect_ratio": "16:9",
"action": "text-to-video"
}
}`)
req, err := http.NewRequest(
"POST",
"https://api.pixapi.ai/v1/async/videos/generations",
bytes.NewBuffer(body),
)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("PIXAPI_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}Response
Pixapi returns a submitted task. Poll GET /v1/tasks/{id} for the final result.
