Skip to content

HappyHorse 1.1

Video with native audio and multilingual lip-sync, 3 to 15 seconds up to 1080p, from text or a first frame.

  • by Alibaba
  • Video
  • from $0.14/s
On this page

1.Call

Video runs as a job: create it, then follow progress over Server-Sent Events, poll, or receive a webhook. Every response carries an x-request-id trace ID.

# 1. Create the job
curl https://api.ewest.ai/v1/videos/generations \
  -H "Authorization: Bearer $EWEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ewest/happy-horse-1.1", "prompt": "A red fox walks through fresh snow"}'
# → 202 {"id": "job_…", "status": "queued", "progress": 0, "eta_seconds": …}

# 2. Follow live progress (Server-Sent Events), or poll GET /v1/jobs/job_…
curl -N https://api.ewest.ai/v1/jobs/job_…/events -H "Authorization: Bearer $EWEST_KEY"

2.Authentication

Send your API key in the Authorization: Bearer header, as the examples above do (clients built for the Anthropic API can use x-api-key). Create keys under API keys. Keep the key on your server, never in browser code. More in the authentication guide.

3.Jobs

Video runs as a job. The create call answers 202 with a job; follow it with GET /v1/jobs/{id}/events (Server-Sent Events), poll GET /v1/jobs/{id}, or pass a webhook_url. The status is one of queued, running, succeeded or failed; the file is in output.url once it has succeeded. See the video guide.

4.Files

Give the start image as a public https URL in image_url. There is no upload step; the URL must be readable without signing in. See Files for limits and formats.

5.Schema

What you send and what comes back, for ewest/happy-horse-1.1. The output tables are read from the API's OpenAPI description.

Input

POST /v1/videos/generations
  • modelstringRequired
    The model id, ewest/happy-horse-1.1.
  • promptstringRequired
    The scene, camera movement and sound. Up to 2,500 characters.
  • durationintegerOptionaldefault 5
    Length in seconds. 3 to 15.
  • resolutionstringOptionaldefault 720p
    Output resolution. One of: 720p, 1080p.
  • aspect_ratiostringOptionaldefault 16:9
    Shape of the video. One of: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21, 5:4, 4:5.
  • image_urlstringOptional
    Public https URL of the start image (image to video).
  • webhook_urlstringOptional
    Public https URL that receives a POST with the finished job.

Output

Returns a video and audio. POST /v1/videos/generations answers 202: The job, queued. GET /v1/jobs/{id} answers 200: The job.

  • idstringAlways
    Also the trace id (x-request-id).
  • objectstringAlways
    Always job.
  • typestringAlways
    Always video.
  • modelstringAlways
    The model that runs the job.
  • statusstringAlways
    queued and running are in progress; succeeded and failed are final. One of queued, running, succeeded, failed.
  • progressintegerAlways
    Estimated from elapsed time; 0 for failed jobs.
  • eta_secondsinteger or nullAlways
    Expected seconds left; null when finished or when the job runs longer than usual.
  • created_atintegerAlways
    Unix seconds when the job was created.
  • started_atinteger or nullAlways
    Unix seconds when the model started generating; null while the job is queued.
  • completed_atinteger or nullAlways
    Unix seconds when the job reached succeeded or failed; null while it is in progress.
  • inputobjectAlways
    The parameters of a video job, defaults filled in.
  • input.promptstringAlways
    The prompt.
  • input.durationintegerAlways
    Length in seconds.
  • input.resolutionstringAlways
    The output resolution, e.g. 720p.
  • input.aspect_ratiostringAlways
    The aspect ratio, e.g. 16:9.
  • input.audiobooleanAlways
    Whether the video has sound.
  • input.image_urlstring (uri) or nullAlways
    The first frame, or null.
  • input.end_image_urlstring (uri) or nullAlways
    The last frame, or null.
  • outputobject or nullAlways
    Set once the job succeeded, null before and when it failed. The file is on cdn.ewest.ai for 7 days.
  • output.urlstring (uri)Always (when set)
    Link to the video on cdn.ewest.ai, kept for 7 days.
  • output.content_typestringAlways (when set)
    Always video/mp4.
  • output.durationnumberAlways (when set)
    Length in seconds.
  • output.resolutionstringAlways (when set)
    The resolution, e.g. 720p.
  • errorobject or nullAlways
    Set when the job failed, null otherwise.
  • error.codestring or nullAlways (when set)
    Why the job failed. generation_failed: The model could not generate the output; retry, or contact support if it keeps happening. content_policy: The prompt or an input was rejected by the model's safety filters. image_download_failed: An input image (image_url or end_image_url) could not be downloaded; check that its URL is public and returns the image. timeout: Generation took too long and was stopped. storage_error: The output was generated but could not be stored; retry. cancelled: You cancelled the job (POST /v1/jobs/{id}/cancel) before it started; it is not charged. One of generation_failed, content_policy, image_download_failed, timeout, storage_error, cancelled.
  • error.messagestringAlways (when set)
    A fixed, readable explanation for the code. Branch on code, not on this text.
  • usageobject or nullAlways
    Billed units once the video job succeeded, null before and when it failed: {"seconds": n}, the seconds of video billed.
  • usage.secondsnumberAlways (when set)
    Seconds of video billed.

Sample response

{
  "id": "job_7Hq2xK9mPz",
  "object": "job",
  "type": "video",
  "model": "ewest/happy-horse-1.1",
  "created_at": 1793530277,
  "input": {
    "prompt": "A red fox walks through fresh snow",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "audio": true,
    "image_url": null,
    "end_image_url": null
  },
  "status": "queued",
  "progress": 2,
  "eta_seconds": 90,
  "started_at": null,
  "completed_at": null,
  "output": null,
  "error": null,
  "usage": null
}

6.Details

Durations
3–15 seconds
Resolutions
720p, 1080p
Aspect ratios
16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21, 5:4, 4:5
Inputs
Prompt, optional start image
Audio
Generated
Typical time
usually 1–5 min