MercadoSoporte← Volver a la app

HappyHorse

Los modelos de HappyHorse se llaman a través de una API de trabajos asíncrona y unificada. Inicia una tarea con POST /api/generate y luego sondea GET /api/generate/{taskId} hasta que termine. Esta familia expone 7 endpoints.

Resumen

Todos los endpoints comparten la misma envoltura — solo cambian model y los campos input. Ejecuta cualquiera desde el playground del Mercado de modelos.

Autenticación

Crea una API key en /api-keys y luego envíala como token Bearer. Las solicitudes desde el navegador con sesión iniciada también funcionan mediante la cookie de sesión.

Authorization: Bearer <YOUR_API_KEY>

Crear tarea

POST
POST https://api.lithovas.com/api/generate

Cuerpo: { "model": "<slug>", "input": { … } }

Respuesta: { "taskId": "<id>", "state": "waiting" }

Consultar resultado

GET
GET https://api.lithovas.com/api/generate/<taskId>

Respuesta: { "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }

Asíncrono
Un 200 de Crear tarea solo significa que la tarea fue aceptada — no que haya terminado. Sondea este endpoint hasta que state sea success o fail. Las tareas fallidas no se facturan.

Endpoints

ModeloTareamodel slug
HappyHorseText to Videohappyhorse/text-to-video
HappyHorseImage to Videohappyhorse/image-to-video
HappyHorseVideo to Videohappyhorse/reference-to-video
HappyHorseVideo Editinghappyhorse/video-edit
HappyHorse 1.1Image to Videohappyhorse-1-1/image-to-video
HappyHorse 1.1Text to Videohappyhorse-1-1/text-to-video
HappyHorse 1.1Video to Videohappyhorse-1-1/reference-to-video

HappyHorse · Text to Video

POSTText to Videohappyhorse/text-to-video
campos input
promptstringobligatorio

Text description of video to generate; max 5000 chars (2500 Chinese)

resolutionenum<string>opcional

Output video resolution setting

aspect_ratioenum<string>opcional

Output aspect ratio format

durationintegeropcional

Video length in seconds (3-15 range)

seedintegeropcional

Random seed for reproducible generation (0-2147483647)

Ejemplo
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "happyhorse/text-to-video",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 5,
    "seed": 0
  }
}'

HappyHorse · Image to Video

POSTImage to Videohappyhorse/image-to-video
campos input
promptstringopcional

Text description for video generation (max 5000 chars)

image_urlsarray<string>obligatorio

Exactly one first-frame image URL (JPEG/PNG/WEBP, 300+ px)

resolutionenum<string>opcional

Output video resolution

durationintegeropcional

Video length in seconds (3-15 range)

seedintegeropcional

Random seed for reproducibility (0-2147483647)

Ejemplo
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "happyhorse/image-to-video",
  "input": {
    "prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
    "image_urls": [
      "https://example.com/input.jpg"
    ],
    "resolution": "1080p",
    "duration": 5,
    "seed": 0
  }
}'

HappyHorse · Video to Video

POSTVideo to Videohappyhorse/reference-to-video
campos input
promptstringobligatorio

Text prompt describing the video to generate (any language)

reference_imagearray<string>obligatorio

Reference image URL list. Provide 1-9 images

resolutionenum<string>opcional

Output video resolution

aspect_ratioenum<string>opcional

Output aspect ratio

durationintegeropcional

Output duration in seconds (integer, 3-15)

seedintegeropcional

Random seed for reproducibility (if supported)

Ejemplo
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "happyhorse/reference-to-video",
  "input": {
    "prompt": "Restyle the source footage with richer lighting, cleaner motion, and a cinematic grade.",
    "reference_image": [
      "https://example.com/input.jpg"
    ],
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 5,
    "seed": 0
  }
}'

HappyHorse · Video Editing

POSTVideo Editinghappyhorse/video-edit
campos input
promptstringobligatorio

Edit instruction for intended change; max 5000 chars (2500 Chinese)

video_urlstringobligatorio

Input video URL (MP4/MOV, 3-60s, max 2160px longer side)

reference_imagearray<string>opcional

Optional reference images (0-5 URLs, JPEG/PNG/WEBP, >=300px)

resolutionenum<string>opcional

Output video resolution

audio_settingenum<string>opcional

Audio handling strategy

seedintegeropcional

Random seed for reproducibility (0-2147483647)

Ejemplo
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "happyhorse/video-edit",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "video_url": "https://example.com/reference.mp4",
    "reference_image": [
      "https://example.com/input.jpg"
    ],
    "resolution": "1080p",
    "audio_setting": "auto",
    "seed": 0
  }
}'

HappyHorse 1.1 · Image to Video

POSTImage to Videohappyhorse-1-1/image-to-video
campos input
promptstringopcional

Describes video content to generate; max 5000 chars

image_urlsarray<string>obligatorio

URL of first frame image (JPEG/PNG/WEBP, 300px+ min)

resolutionenum<string>opcional

Output video resolution

durationnumberopcional

Video length in seconds; range [3, 15]

Ejemplo
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "happyhorse-1-1/image-to-video",
  "input": {
    "prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
    "image_urls": [
      "https://example.com/input.jpg"
    ],
    "resolution": "1080p",
    "duration": 5
  }
}'

HappyHorse 1.1 · Text to Video

POSTText to Videohappyhorse-1-1/text-to-video
campos input
promptstringobligatorio

Text description of the video; max 5000 chars (2500 Chinese)

resolutionenum<string>opcional

Output video resolution

aspect_ratioenum<string>opcional

Output video aspect ratio

durationnumberopcional

Output video duration in seconds (3-15, whole numbers)

Ejemplo
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "happyhorse-1-1/text-to-video",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 5
  }
}'

HappyHorse 1.1 · Video to Video

POSTVideo to Videohappyhorse-1-1/reference-to-video
campos input
promptstringobligatorio

Description of desired elements and visual style for the video

reference_imagearray<string>obligatorio

URLs of reference images (JPEG/PNG/WEBP, min 400px, max 20MB)

resolutionenum<string>opcional

Output video resolution tier

aspect_ratioenum<string>opcional

Video aspect ratio format

durationnumberopcional

Video length in seconds (integer, 3-15 range)

Ejemplo
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "happyhorse-1-1/reference-to-video",
  "input": {
    "prompt": "Restyle the source footage with richer lighting, cleaner motion, and a cinematic grade.",
    "reference_image": [
      "https://example.com/input.jpg"
    ],
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "duration": 5
  }
}'