HappyHorse 1.0 · Видео API
POST https://api.synesta.ai/v1/generations
ID модели: happyhorse-1.0-text-to-video
Особенности
- Цена от $1.14 за секунду (от 18.17 кредитов). Точную цену с вашими параметрами даёт
POST /estimate. - Референсы не принимает.
- Длительность от 3 до 15 с.
- Промпт до 5000 символов.
Быстрый старт
Запустите генерацию и заберите результат, как в Быстром старте. Ключ в переменной SYNESTA_API_KEY.
bash
curl -X POST https://api.synesta.ai/v1/generations \
-H "Authorization: Bearer $SYNESTA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"type":"video","model":"happyhorse-1.0-text-to-video","prompt":"A lighthouse at dawn, waves rolling in","aspect":"16:9","resolution":"720p","duration":5}'
# затем опрашивайте, пока status не станет done или failed
curl https://api.synesta.ai/v1/generations/GENERATION_ID \
-H "Authorization: Bearer $SYNESTA_API_KEY"python
import os, time, uuid, requests
BASE = "https://api.synesta.ai/v1"
headers = {"Authorization": f"Bearer {os.environ['SYNESTA_API_KEY']}"}
res = requests.post(
f"{BASE}/generations",
headers={**headers, "Idempotency-Key": str(uuid.uuid4())},
json={
"type": "video",
"model": "happyhorse-1.0-text-to-video",
"prompt": "A lighthouse at dawn, waves rolling in",
"aspect": "16:9",
"resolution": "720p",
"duration": 5,
},
)
data = res.json()["data"]
while data["status"] not in ("done", "failed"):
time.sleep(3)
data = requests.get(f"{BASE}/generations/{data['id']}", headers=headers).json()["data"]
print(data["status"], [o["url"] for o in data["outputs"]])js
const BASE = 'https://api.synesta.ai/v1';
const headers = { Authorization: `Bearer ${process.env.SYNESTA_API_KEY}` };
const start = await fetch(`${BASE}/generations`, {
method: 'POST',
headers: { ...headers, 'Content-Type': 'application/json', 'Idempotency-Key': crypto.randomUUID() },
body: JSON.stringify({
"type": "video",
"model": "happyhorse-1.0-text-to-video",
"prompt": "A lighthouse at dawn, waves rolling in",
"aspect": "16:9",
"resolution": "720p",
"duration": 5
}),
});
let { data } = await start.json();
while (data.status !== 'done' && data.status !== 'failed') {
await new Promise((r) => setTimeout(r, 3000));
({ data } = await (await fetch(`${BASE}/generations/${data.id}`, { headers })).json());
}
console.log(data.status, data.outputs.map((o) => o.url));Входные параметры
Тело POST /generations. Лишнее поле или неверный тип · 422 invalid_parameters, поле, которое модель не принимает, · 422 unsupported_input.
| Поле | Тип | Обязательное | По умолчанию | Значения и пределы |
|---|---|---|---|---|
type | string | да | — | video |
model | string | да | — | — |
prompt | string | да | — | длина до 5000 |
aspect | string | "16:9" | 16:9, 9:16, 1:1, 4:3, 3:4 | |
resolution | string | "720p" | 720p, 1080p | |
duration | integer | 5 | 3 … 15 | |
video_mode | string | — | длина до 32 | |
max_credits | number | — | от 0 | |
webhook_url | string | — | длина до 2048; format uri |
Полная JSON-схема
json
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"model",
"prompt"
],
"properties": {
"type": {
"type": "string",
"enum": [
"video"
]
},
"model": {
"type": "string"
},
"prompt": {
"type": "string",
"maxLength": 5000
},
"aspect": {
"type": "string",
"enum": [
"16:9",
"9:16",
"1:1",
"4:3",
"3:4"
],
"default": "16:9"
},
"resolution": {
"type": "string",
"enum": [
"720p",
"1080p"
],
"default": "720p"
},
"duration": {
"type": "integer",
"default": 5,
"minimum": 3,
"maximum": 15
},
"video_mode": {
"type": "string",
"maxLength": 32
},
"max_credits": {
"type": "number",
"minimum": 0
},
"webhook_url": {
"type": "string",
"maxLength": 2048,
"format": "uri"
}
}
}Ответ
В примере указана цена «от»: итог зависит от параметров, его даёт POST /estimate.
Принято · 202
Сразу после запуска. Деньги списаны, результата ещё нет.
json
{
"data": {
"id": 12345,
"type": "video",
"model": "happyhorse-1.0-text-to-video",
"status": "queued",
"prompt": "A lighthouse at dawn, waves rolling in",
"cost_credits": 18.17,
"cost_usd": 1.135625,
"refunded": false,
"credits_refunded": 0,
"created_at": "2026-01-15T10:00:00Z",
"finished_at": null,
"outputs": [],
"error": null,
"queue": {
"queued_at": "2026-01-15T10:00:00Z"
},
"partial_refund": null,
"applied": {
"model": "happyhorse-1.0-text-to-video",
"aspect": "16:9",
"resolution": "720p",
"duration": 5
}
},
"meta": {
"replayed": false
}
}Готово · GET /generations/{id}
Когда status стал done. Ссылки в примере условные.
json
{
"data": {
"id": 12345,
"type": "video",
"model": "happyhorse-1.0-text-to-video",
"status": "done",
"prompt": "A lighthouse at dawn, waves rolling in",
"cost_credits": 18.17,
"cost_usd": 1.135625,
"refunded": false,
"credits_refunded": 0,
"created_at": "2026-01-15T10:00:00Z",
"finished_at": "2026-01-15T10:00:42Z",
"outputs": [
{
"url": "https://storage.example.com/result.mp4",
"kind": "video",
"mime": "video/mp4",
"preview_url": null,
"thumb_url": "https://storage.example.com/result-thumb.webp"
}
],
"error": null,
"queue": {
"queued_at": "2026-01-15T10:00:00Z"
},
"partial_refund": null,
"applied": {
"model": "happyhorse-1.0-text-to-video",
"aspect": "16:9",
"resolution": "720p",
"duration": 5
}
}
}Другие модели
Семейство HappyHorse
- HappyHorse 1.1 · от $0.88 за секунду
Видео
- Grok Video · от $0.11 за секунду
- Runway · от $0.49 за запуск
- Seedance 1.0 Fast · от $0.06 за секунду
- Seedance 1.5 Pro · от $0.13 за секунду