DocsHappyHorse 1.0 API usage and code examples

HappyHorse 1.0 API usage and code examples

Base URL, authentication, endpoints, and code examples for calling HappyHorse 1.0 (model ID: happyhorse-1.0) through the API.

Model details

Model IDhappyhorse-1.0
ProviderAlibaba Cloud(HappyHorse)
TypeVideo
StatusAvailable
Length3–15 seconds
Resolution720P, 1080P
Supported inputsText (prompt), First frame
File availabilityNot published
Processing regionGlobal
PricingSee the model page

Base URL and authentication

FormatBase URLKey header
OpenAIhttps://token.echohub.io/v1Authorization: Bearer

Create an API key in the console and put it in the ECHO_API_KEY environment variable.

Endpoints

Method and pathWhat it does
POST /v1/videosSubmit a video generation job
GET /v1/videos/{id}Return progress
GET /v1/videos/{id}/contentReturn the finished video file

Call examples

Three steps: submit, check progress, download (example: 5 seconds, 720P).

# 1. Submit the job (note the returned id)
curl https://token.echohub.io/v1/videos \
  -H "Authorization: Bearer $ECHO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "happyhorse-1.0",
    "prompt": "A Shiba Inu walking slowly along the beach at dusk",
    "seconds": 5,
    "resolution": "720P"
  }'

# 2. Check progress (VIDEO_ID is the id from step 1)
VIDEO_ID="task_..."
curl https://token.echohub.io/v1/videos/$VIDEO_ID \
  -H "Authorization: Bearer $ECHO_API_KEY"

# 3. Download when status is completed
curl -o video.mp4 https://token.echohub.io/v1/videos/$VIDEO_ID/content \
  -H "Authorization: Bearer $ECHO_API_KEY"

Related docs