seedinteger
Random seed for reproducibility (0-2147483647).
alibaba/happy-horse/video-editHappy Horse Video Edit by Alibaba - AI-powered video editing and transformation. Apply style transfer, motion control, lip-sync, and visual effects to existing videos with natural language instructions.
model को आज़माएँ
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
आप आगे क्या करना चाहेंगे?
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"prompt": "Make the scene snowy",
"resolution": "720p",
"video": "https://static.sandbase.ai/examples/d40d74d4-3ccc-4e10-8d82-cb6d7040edc4/input/19f9589e-def6-4f7b-a519-2d17f8de3364.mp4"
}Edit an existing clip with Happy Horse: restyle it, change objects or wardrobe, or rework the scene with an instruction. Optional reference images show the target look; the source motion and length are kept.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text instruction. |
video | video URL, required | — | Source clip, Video 1 in the prompt. |
resolution | 720p / 1080p | 720p | Sets the per-second rate. |
seed | integer | random | Fix it to compare prompt changes. |
reference_image_urls | image URL[] | — | Optional reference images for the new look. |
audio_setting | auto / origin | auto | auto regenerates audio to match the edit; origin keeps the source track. |
Alibaba bills the source and the edited output, which are the same length, so each source second bills twice: $0.28 at 720p and $0.48 at 1080p. The quote before submission assumes a 5-second source; the final charge uses the measured length.
| Source clip | 720p | 1080p |
|---|---|---|
| 3s | $0.84 | $1.44 |
| 5s | $1.40 | $2.40 |
| 10s | $2.80 | $4.80 |
| 15s | $4.20 | $7.20 |
Failed runs are not charged.
Other Happy Horse endpoints: alibaba/happy-horse/text-to-video, alibaba/happy-horse/image-to-video, alibaba/happy-horse/reference-to-video, alibaba/wan/2.7/video-edit (Wan alternative, bills output only).
बिल्डिंग शुरू करें
इस model को SandBase Unified Run API के माध्यम से सबमिट करें।
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"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": "720p",
"audio_setting": "auto"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"एक SandBase API key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
seedintegerRandom seed for reproducibility (0-2147483647).
videostringआवश्यक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
promptstringआवश्यकText prompt describing the desired edit. Reference any supplied reference images using @Image1, @Image2, ... up to @Image5. Max 2500 characters.
resolutionstringOutput video resolution tier.
डिफ़ॉल्ट: "720p"
संभावित मान: "720p", "1080p"
audio_settingstringAudio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve the original audio from the input video.
डिफ़ॉल्ट: "auto"
संभावित मान: "auto", "origin"
reference_image_urlsarrayOptional 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.
{
"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": "720p",
"audio_setting": "auto"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"poster": "https://static.sandbase.ai/examples/posters/a38c83680a6fc0c43e91.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/d40d74d4-3ccc-4e10-8d82-cb6d7040edc4/output/ef651f94-d7df-4be7-a000-d972e67a32bb.mp4"
}
]