API reference · Alibaba
alibaba/happy-horse/video-edit
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
alibaba/happy-horse/video-edit01
Input Schema
6 parameters · 1 required · 5 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | Text prompt describing the desired edit. Reference any supplied reference images using @Image1, @Image2, ... up to @Image5. Max 2500 characters. · Min length: 1 |
seed | integer | Optional | Random seed for reproducibility (0-2147483647). |
video | string | Optional | URL of the source video to edit. Formats: MP4, MOV (H.264 recommended). Duration: 3-60 s. Longer side ≤ 2160 px, shorter side ≥ 320 px. Aspect ratio between 1:2.5 and 2.5:1. Frame rate > 8 fps. Max 100 MB. The output video preserves the source aspect ratio. Output duration matches the input video, capped at 15 s (longer inputs are truncated to the first 15 s). Max file size: 100.0MB, Min duration: 3s, Max duration: 60s, Timeout: 30.0s |
resolution | string | Optional | Output video resolution tier. · Options: 720p, 1080p · Default: "1080p" 720p1080p |
audio_setting | string | Optional | Audio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve the original audio from the input video. · Options: auto, origin · Default: "auto" autoorigin |
reference_image_urls | string[] | Optional | Optional reference images used to guide the edit (up to 5). Formats: JPEG, JPG, PNG, WEBP. Dimensions must be at least 300px. Aspect ratio between 1:2.5 and 2.5:1. Max 10 MB each. |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "alibaba/happy-horse/video-edit",
"video": "https://static.sandbase.ai/examples/alibaba/happy-horse/video-edit/input_video_0.mp4",
"prompt": "Recolor the sky to a deep purple sunset.",
"resolution": "1080p",
"audio_setting": "auto"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
