Текст в речь

Клонирование голоса

Липсинк

Другое

Создать модель

Тест API создания голосовой модели.

API создания модели

Эндпоинт

POST /api/open/create-model

Заголовки запроса

Content-Type: multipart/form-data
Authorization: Bearer YOUR_API_TOKEN  // API ключ

Параметры запроса

Form Data:
name: string        // undefined,Название модели
description: string // undefined,Описание модели
visibility: string  // undefined,Model visibility,undefined 'private',undefined:'public' | 'private'
audioFiles: File  // undefined,Аудиофайлы,Format:wav/mp3

Ответ

// undefined - 200
{
  "modelId": string,    // Created model ID
  "title": string,     // Название модели
  "description": string, // Описание модели
  "createdAt": string,  // Created at
  "message": string     // Success message
}

// undefined
{
  "error": string     // undefined
}

Пример CURL

curl -X POST https://fishaudio.org/api/open/create-model \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "name=Название модели" \
  -F "description=Описание модели" \
  -F "visibility=private" \
  -F "audioFiles=@/path/to/audio1.wav"

Онлайн-отладка

Коды статуса

200: Success
400: Bad Request
401: Unauthorized
403: Forbidden
404: Not Found
429: Too Many Requests
500: Internal Server Error