Edit video using HappyHorse 1.0 video edit
curl --request POST \
--url https://api.crun.ai/api/v1/client/job/CreateTask \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "happyhorse-1-0-video-edit",
"callback_url": "https://your-domain.com/api/callback",
"input": {
"prompt": "Transform the scene into a snowy mountain trail while preserving the subject motion.",
"video_url": "https://example.com/input-video.mp4",
"img_urls": [
"https://example.com/reference-style.jpg"
],
"resolution": "720P",
"region": "global",
"audio_setting": "auto",
"input_compliance": "enable",
"output_compliance": "enable"
}
}
'import requests
url = "https://api.crun.ai/api/v1/client/job/CreateTask"
payload = {
"model": "happyhorse-1-0-video-edit",
"callback_url": "https://your-domain.com/api/callback",
"input": {
"prompt": "Transform the scene into a snowy mountain trail while preserving the subject motion.",
"video_url": "https://example.com/input-video.mp4",
"img_urls": ["https://example.com/reference-style.jpg"],
"resolution": "720P",
"region": "global",
"audio_setting": "auto",
"input_compliance": "enable",
"output_compliance": "enable"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'happyhorse-1-0-video-edit',
callback_url: 'https://your-domain.com/api/callback',
input: {
prompt: 'Transform the scene into a snowy mountain trail while preserving the subject motion.',
video_url: 'https://example.com/input-video.mp4',
img_urls: ['https://example.com/reference-style.jpg'],
resolution: '720P',
region: 'global',
audio_setting: 'auto',
input_compliance: 'enable',
output_compliance: 'enable'
}
})
};
fetch('https://api.crun.ai/api/v1/client/job/CreateTask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.crun.ai/api/v1/client/job/CreateTask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'happyhorse-1-0-video-edit',
'callback_url' => 'https://your-domain.com/api/callback',
'input' => [
'prompt' => 'Transform the scene into a snowy mountain trail while preserving the subject motion.',
'video_url' => 'https://example.com/input-video.mp4',
'img_urls' => [
'https://example.com/reference-style.jpg'
],
'resolution' => '720P',
'region' => 'global',
'audio_setting' => 'auto',
'input_compliance' => 'enable',
'output_compliance' => 'enable'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.crun.ai/api/v1/client/job/CreateTask"
payload := strings.NewReader("{\n \"model\": \"happyhorse-1-0-video-edit\",\n \"callback_url\": \"https://your-domain.com/api/callback\",\n \"input\": {\n \"prompt\": \"Transform the scene into a snowy mountain trail while preserving the subject motion.\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"img_urls\": [\n \"https://example.com/reference-style.jpg\"\n ],\n \"resolution\": \"720P\",\n \"region\": \"global\",\n \"audio_setting\": \"auto\",\n \"input_compliance\": \"enable\",\n \"output_compliance\": \"enable\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.crun.ai/api/v1/client/job/CreateTask")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"happyhorse-1-0-video-edit\",\n \"callback_url\": \"https://your-domain.com/api/callback\",\n \"input\": {\n \"prompt\": \"Transform the scene into a snowy mountain trail while preserving the subject motion.\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"img_urls\": [\n \"https://example.com/reference-style.jpg\"\n ],\n \"resolution\": \"720P\",\n \"region\": \"global\",\n \"audio_setting\": \"auto\",\n \"input_compliance\": \"enable\",\n \"output_compliance\": \"enable\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crun.ai/api/v1/client/job/CreateTask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"happyhorse-1-0-video-edit\",\n \"callback_url\": \"https://your-domain.com/api/callback\",\n \"input\": {\n \"prompt\": \"Transform the scene into a snowy mountain trail while preserving the subject motion.\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"img_urls\": [\n \"https://example.com/reference-style.jpg\"\n ],\n \"resolution\": \"720P\",\n \"region\": \"global\",\n \"audio_setting\": \"auto\",\n \"input_compliance\": \"enable\",\n \"output_compliance\": \"enable\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"task_id": "task_12345678"
}
}HappyHorse 1.0
HappyHorse 1.0 Video Edit
The HappyHorse video editing model supports input videos and reference images, and performs editing tasks such as style transformation and partial replacement in combination with text instructions.
POST
/
api
/
v1
/
client
/
job
/
CreateTask
Edit video using HappyHorse 1.0 video edit
curl --request POST \
--url https://api.crun.ai/api/v1/client/job/CreateTask \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "happyhorse-1-0-video-edit",
"callback_url": "https://your-domain.com/api/callback",
"input": {
"prompt": "Transform the scene into a snowy mountain trail while preserving the subject motion.",
"video_url": "https://example.com/input-video.mp4",
"img_urls": [
"https://example.com/reference-style.jpg"
],
"resolution": "720P",
"region": "global",
"audio_setting": "auto",
"input_compliance": "enable",
"output_compliance": "enable"
}
}
'import requests
url = "https://api.crun.ai/api/v1/client/job/CreateTask"
payload = {
"model": "happyhorse-1-0-video-edit",
"callback_url": "https://your-domain.com/api/callback",
"input": {
"prompt": "Transform the scene into a snowy mountain trail while preserving the subject motion.",
"video_url": "https://example.com/input-video.mp4",
"img_urls": ["https://example.com/reference-style.jpg"],
"resolution": "720P",
"region": "global",
"audio_setting": "auto",
"input_compliance": "enable",
"output_compliance": "enable"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'happyhorse-1-0-video-edit',
callback_url: 'https://your-domain.com/api/callback',
input: {
prompt: 'Transform the scene into a snowy mountain trail while preserving the subject motion.',
video_url: 'https://example.com/input-video.mp4',
img_urls: ['https://example.com/reference-style.jpg'],
resolution: '720P',
region: 'global',
audio_setting: 'auto',
input_compliance: 'enable',
output_compliance: 'enable'
}
})
};
fetch('https://api.crun.ai/api/v1/client/job/CreateTask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.crun.ai/api/v1/client/job/CreateTask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'happyhorse-1-0-video-edit',
'callback_url' => 'https://your-domain.com/api/callback',
'input' => [
'prompt' => 'Transform the scene into a snowy mountain trail while preserving the subject motion.',
'video_url' => 'https://example.com/input-video.mp4',
'img_urls' => [
'https://example.com/reference-style.jpg'
],
'resolution' => '720P',
'region' => 'global',
'audio_setting' => 'auto',
'input_compliance' => 'enable',
'output_compliance' => 'enable'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.crun.ai/api/v1/client/job/CreateTask"
payload := strings.NewReader("{\n \"model\": \"happyhorse-1-0-video-edit\",\n \"callback_url\": \"https://your-domain.com/api/callback\",\n \"input\": {\n \"prompt\": \"Transform the scene into a snowy mountain trail while preserving the subject motion.\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"img_urls\": [\n \"https://example.com/reference-style.jpg\"\n ],\n \"resolution\": \"720P\",\n \"region\": \"global\",\n \"audio_setting\": \"auto\",\n \"input_compliance\": \"enable\",\n \"output_compliance\": \"enable\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.crun.ai/api/v1/client/job/CreateTask")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"happyhorse-1-0-video-edit\",\n \"callback_url\": \"https://your-domain.com/api/callback\",\n \"input\": {\n \"prompt\": \"Transform the scene into a snowy mountain trail while preserving the subject motion.\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"img_urls\": [\n \"https://example.com/reference-style.jpg\"\n ],\n \"resolution\": \"720P\",\n \"region\": \"global\",\n \"audio_setting\": \"auto\",\n \"input_compliance\": \"enable\",\n \"output_compliance\": \"enable\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crun.ai/api/v1/client/job/CreateTask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"happyhorse-1-0-video-edit\",\n \"callback_url\": \"https://your-domain.com/api/callback\",\n \"input\": {\n \"prompt\": \"Transform the scene into a snowy mountain trail while preserving the subject motion.\",\n \"video_url\": \"https://example.com/input-video.mp4\",\n \"img_urls\": [\n \"https://example.com/reference-style.jpg\"\n ],\n \"resolution\": \"720P\",\n \"region\": \"global\",\n \"audio_setting\": \"auto\",\n \"input_compliance\": \"enable\",\n \"output_compliance\": \"enable\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"task_id": "task_12345678"
}
}Query Task Status
After submitting a task, use the unified query endpoint to check progress and retrieve results:Get Task Info
Learn how to query task status and retrieve generation results
For production use, we recommend using the
callback_url parameter to receive automatic notifications when generation completes, rather than polling the status endpoint.Related Resources
Models Overview
Explore all available models
Common API
Check credits and account usage
Authorizations
All APIs require authentication via API Key.
Get API Key:
- Visit API Key Management Page to get your API Key
Usage: Add to request header:
x-api-key: YOUR_API_KEY
Body
application/json
The model name to use for generation. Required field.
- Must be
happyhorse-1-0-video-editfor this endpoint
Available options:
happyhorse-1-0-video-edit Input parameters for the HappyHorse 1.0 video editing task.
Show child attributes
Show child attributes
Optional. Callback URL for receiving task completion notifications.
Example:
"https://your-domain.com/api/callback"
Was this page helpful?
⌘I
