Multilingual v2 · Голос API
POST https://api.synesta.ai/v1/generations
ID модели: multilingual-v2
Особенности
- Цена от $0.44 за символ (от 7 кредитов). Точную цену с вашими параметрами даёт
POST /estimate. - Референсы не принимает.
- Промпт до 10000 символов.
Быстрый старт
Запустите генерацию и заберите результат, как в Быстром старте. Ключ в переменной 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":"voice","model":"multilingual-v2","prompt":"Hello from Synesta","voice_id":"george"}'
# затем опрашивайте, пока 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": "voice",
"model": "multilingual-v2",
"prompt": "Hello from Synesta",
"voice_id": "george",
},
)
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": "voice",
"model": "multilingual-v2",
"prompt": "Hello from Synesta",
"voice_id": "george"
}),
});
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 | да | — | voice |
model | string | да | — | — |
prompt | string | да | — | длина до 10000 |
voice_id | string | "george" | george, daniel, lily, alice, matilda, bella, rachel, antoni, roger, charlie, will, eric, chris, jessica, sarah, aria, domi, harry, callum, sam, charlotte, patrick, brian, adam, bill, liam, laura, josh, arnold, drew | |
speed | number | — | 0.7 … 1.2 | |
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": [
"voice"
]
},
"model": {
"type": "string"
},
"prompt": {
"type": "string",
"maxLength": 10000
},
"voice_id": {
"type": "string",
"enum": [
"george",
"daniel",
"lily",
"alice",
"matilda",
"bella",
"rachel",
"antoni",
"roger",
"charlie",
"will",
"eric",
"chris",
"jessica",
"sarah",
"aria",
"domi",
"harry",
"callum",
"sam",
"charlotte",
"patrick",
"brian",
"adam",
"bill",
"liam",
"laura",
"josh",
"arnold",
"drew"
],
"default": "george"
},
"speed": {
"type": "number",
"minimum": 0.7,
"maximum": 1.2
},
"max_credits": {
"type": "number",
"minimum": 0
},
"webhook_url": {
"type": "string",
"maxLength": 2048,
"format": "uri"
}
}
}Ответ
В примере указана цена «от»: итог зависит от параметров, его даёт POST /estimate.
Принято · 202
Сразу после запуска. Деньги списаны, результата ещё нет.
json
{
"data": {
"id": 12345,
"type": "voice",
"model": "multilingual-v2",
"status": "queued",
"prompt": "Hello from Synesta",
"cost_credits": 7,
"cost_usd": 0.4375,
"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": "multilingual-v2",
"voice_id": "george"
}
},
"meta": {
"replayed": false
}
}Готово · GET /generations/{id}
Когда status стал done. Ссылки в примере условные.
json
{
"data": {
"id": 12345,
"type": "voice",
"model": "multilingual-v2",
"status": "done",
"prompt": "Hello from Synesta",
"cost_credits": 7,
"cost_usd": 0.4375,
"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.mp3",
"kind": "audio",
"mime": "audio/mpeg",
"preview_url": null,
"thumb_url": null
}
],
"error": null,
"queue": {
"queued_at": "2026-01-15T10:00:00Z"
},
"partial_refund": null,
"applied": {
"model": "multilingual-v2",
"voice_id": "george"
}
}
}Другие модели
Семейство other
- Eleven v3 · от $0.44 за символ
- Eleven v4 · от $0.44 за символ
- Eleven v4 Turbo · от $0.22 за символ
- Flash v2.5 · от $0.22 за символ
- Turbo v2.5 · от $0.22 за символ