Skip to content

HappyHorse

HappyHorse video generation with text-to-video, image-to-video, reference, and edit modes.

API surface

OperationEndpointMode
Video generation taskPOST /v1/async/videos/generationsAsync only

Models

Model idNotes
happyhorse-1.0Text-to-video and image-to-video. Also supports reference-to-video / video-edit via providerOptions. seconds 315.

Pricing

Billed as n × seconds × rate(resolution) credits. Default resolution is 1080p.

Model720p1080p
happyhorse-1.013/sec23/sec

Request fields

FieldTypeRequiredDescription
modelstringYeshappyhorse-1.0.
promptstringYes1–2000 characters.
secondsintegerYes315.
resolutionstringNo720p or 1080p (default).
nintegerNoDefault 1.
imagestring | string[]NoPublic http(s) image URL for image-to-video.
providerOptionsobjectNoOptional model extensions. See providerOptions below.

providerOptions

FieldTypeDescription
aspect_ratiostring16:9 / 9:16 / 1:1 / 4:3 / 3:4.
actionstringGeneration mode: text-to-video / image-to-video / reference-to-video / video-edit.
reference_imagesarrayReference images for reference-to-video.
image_with_rolesobject[]Role-tagged reference images when needed.
urlstringSource video URL for video-edit.
audio_settingstringEdit audio handling: auto or origin.
seedintegerRandom seed for more reproducible results.
watermarkbooleanWhether 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.