cURL
curl --request POST \
--url https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"model": "happyhorse-1.0-r2v",
"input": {
"prompt": "<string>",
"media": [
{
"type": "reference_image",
"url": "<string>"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": false,
"seed": 12345
}
}
'import requests
url = "https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis"
payload = {
"model": "happyhorse-1.0-r2v",
"input": {
"prompt": "<string>",
"media": [
{
"type": "reference_image",
"url": "<string>"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": False,
"seed": 12345
}
}
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'happyhorse-1.0-r2v',
input: {prompt: '<string>', media: [{type: 'reference_image', url: '<string>'}]},
parameters: {resolution: '720P', ratio: '16:9', duration: 5, watermark: false, seed: 12345}
})
};
fetch('https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis', 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.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis",
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-r2v',
'input' => [
'prompt' => '<string>',
'media' => [
[
'type' => 'reference_image',
'url' => '<string>'
]
]
],
'parameters' => [
'resolution' => '720P',
'ratio' => '16:9',
'duration' => 5,
'watermark' => false,
'seed' => 12345
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TT-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.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis"
payload := strings.NewReader("{\n \"model\": \"happyhorse-1.0-r2v\",\n \"input\": {\n \"prompt\": \"<string>\",\n \"media\": [\n {\n \"type\": \"reference_image\",\n \"url\": \"<string>\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"watermark\": false,\n \"seed\": 12345\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TT-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.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"happyhorse-1.0-r2v\",\n \"input\": {\n \"prompt\": \"<string>\",\n \"media\": [\n {\n \"type\": \"reference_image\",\n \"url\": \"<string>\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"watermark\": false,\n \"seed\": 12345\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TT-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"happyhorse-1.0-r2v\",\n \"input\": {\n \"prompt\": \"<string>\",\n \"media\": [\n {\n \"type\": \"reference_image\",\n \"url\": \"<string>\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"watermark\": false,\n \"seed\": 12345\n }\n}"
response = http.request(request)
puts response.read_body{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}HappyHorse
Генерация по референсу
Генерация по ссылке — генерация видео на основе нескольких эталонных изображений
POST
/
happyhorse
/
api
/
v1
/
services
/
aigc
/
video-generation
/
video-synthesis
cURL
curl --request POST \
--url https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"model": "happyhorse-1.0-r2v",
"input": {
"prompt": "<string>",
"media": [
{
"type": "reference_image",
"url": "<string>"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": false,
"seed": 12345
}
}
'import requests
url = "https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis"
payload = {
"model": "happyhorse-1.0-r2v",
"input": {
"prompt": "<string>",
"media": [
{
"type": "reference_image",
"url": "<string>"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": False,
"seed": 12345
}
}
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'happyhorse-1.0-r2v',
input: {prompt: '<string>', media: [{type: 'reference_image', url: '<string>'}]},
parameters: {resolution: '720P', ratio: '16:9', duration: 5, watermark: false, seed: 12345}
})
};
fetch('https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis', 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.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis",
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-r2v',
'input' => [
'prompt' => '<string>',
'media' => [
[
'type' => 'reference_image',
'url' => '<string>'
]
]
],
'parameters' => [
'resolution' => '720P',
'ratio' => '16:9',
'duration' => 5,
'watermark' => false,
'seed' => 12345
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TT-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.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis"
payload := strings.NewReader("{\n \"model\": \"happyhorse-1.0-r2v\",\n \"input\": {\n \"prompt\": \"<string>\",\n \"media\": [\n {\n \"type\": \"reference_image\",\n \"url\": \"<string>\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"watermark\": false,\n \"seed\": 12345\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TT-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.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"happyhorse-1.0-r2v\",\n \"input\": {\n \"prompt\": \"<string>\",\n \"media\": [\n {\n \"type\": \"reference_image\",\n \"url\": \"<string>\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"watermark\": false,\n \"seed\": 12345\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/happyhorse/api/v1/services/aigc/video-generation/video-synthesis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TT-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"happyhorse-1.0-r2v\",\n \"input\": {\n \"prompt\": \"<string>\",\n \"media\": [\n {\n \"type\": \"reference_image\",\n \"url\": \"<string>\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"ratio\": \"16:9\",\n \"duration\": 5,\n \"watermark\": false,\n \"seed\": 12345\n }\n}"
response = http.request(request)
puts response.read_body{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}Это интерфейс видео API HappyHorse для генерации видео по ссылке, генерация видео на основе нескольких эталонных изображений.
Авторизации
Пожалуйста, перейдите на консоль TTAPI, чтобы получить ключ API.
Тело
application/json
Название модели. Поддерживает happyhorse-1.0-r2v и happyhorse-1.1-r2v.
Доступные опции:
happyhorse-1.0-r2v, happyhorse-1.1-r2v Пример:
"happyhorse-1.0-r2v"
Базовая входная информация, включая эталонные изображения и промпт.
Show child attributes
Show child attributes
Параметры генерации видео, такие как настройка разрешения видео, соотношения сторон, продолжительности и т. д.
Show child attributes
Show child attributes
Последнее изменение 12 июня 2026 г.
⌘I