Index TTS 2.0
sandbase-ai/index-tts-2Index TTS 2.0 from bilibili's IndexTeam speaks text in the voice of a reference recording (zero-shot cloning) and controls emotion separately through a second reference clip, per-emotion strengths, or a text description.
- Базовая цена
- $0.02USD / запуск
- Выполнение
- async
- Тип модели
- audio
- Поля ввода
- 7
Попробовать модель
Песочница
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
Карточка модели
Характеристики
Цены
- Базовая цена
- $0.02 / запуск
Контекст и модальности
- Вход
- Определяется схемой
- Выход
- audio
Возможности
- Чат
- Не поддерживается
- Зрение
- Не поддерживается
- Рассуждение
- Не поддерживается
- Структурированный вывод
- Не поддерживается
- Вызов функций
- Не поддерживается
- Аудиовход
- Не поддерживается
Доступ
- Провайдер
- sandbase-ai
- ID модели
- sandbase-ai/index-tts-2
- Выполнение
- async
- Базовый URL
- https://api.sandbase.ai
- API
- Unified Run API
- Эндпоинт
- /v1/run
README по API
Index TTS 2.0
Index TTS 2.0 clones the voice in a reference clip and speaks new text with it. Emotion is controlled separately: from a second reference clip, eight per-emotion strengths, or the emotion inferred from text.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
text | string, required | — | Text to speak. |
audio | audio file or URL, required | — | Voice to clone. |
emotional_audio | audio file or URL | — | Clip whose emotional style is transferred. |
strength | number 0–1 | 1 | Strength of the emotional style transfer. |
emotional_strengths | object of numbers 0–1 | — | happy, angry, sad, afraid, disgusted, melancholic, surprised, calm. |
should_use_prompt_for_emotion | boolean | false | Infer emotion from the text or emotion_prompt; overrides emotional_strengths. |
emotion_prompt | string | — | Text describing the emotion; used when should_use_prompt_for_emotion is true. |
Billing
$0.002 per second of generated audio. The quote before submission assumes 10 seconds; the final charge uses the measured output length.
| Output | Price |
|---|---|
| 10 seconds | $0.02 |
| 30 seconds | $0.06 |
| 1 minute | $0.12 |
Failed runs are not charged.
Prompting
- Use a clean 5–15 second reference clip of a single speaker.
- Pick one emotion control: a reference clip,
emotional_strengths, orshould_use_prompt_for_emotion.
Начните разработку
Отправьте свой первый запрос
Совместимая с OpenAI конечная точка с единообразной аутентификацией и учётом использования.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "sandbase-ai/index-tts-2",
"text": "Hide! He's coming! He's coming to get us!",
"audio": "https://storage.googleapis.com/falserverless/example_inputs/index-tts-2/tts_in.mp3",
"strength": 1,
"emotion_prompt": "You scared me to death! What are you, a ghost?",
"should_use_prompt_for_emotion": false
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Схема ввода
7 параметров · 2 обязательных · 5 необязательных
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
text | string | Обязательный | The text to speak. |
audio | string | Обязательный | Reference speech audio file or URL; the output is spoken in this voice (zero-shot cloning). |
strength | number | Необязательный | Strength of the emotional style transfer. Higher values give stronger emotional influence. · Мин.: 0 · Макс.: 1 · По умолчанию: 1 |
emotion_prompt | string | Необязательный | Text whose emotion is used instead of the spoken text. Requires should_use_prompt_for_emotion. |
emotional_audio | string | Необязательный | Optional audio file or URL whose emotional style is transferred to the output. |
emotional_strengths | object | Необязательный | Per-emotion strengths (0-1) for fine-grained control: happy, angry, sad, afraid, disgusted, melancholic, surprised, calm. |
should_use_prompt_for_emotion | boolean | Необязательный | Derive emotional strengths from the text (or from emotion_prompt when set). Overrides emotional_strengths. · По умолчанию: false |
Схема вывода
| Поле | Тип | Описание |
|---|---|---|
id | string | Уникальный идентификатор задачи генерации |
status | string | Статус задачи: pending, running, completed, failed, timeout |
model | string | Модель, использованная для генерации |
outputs | array | Массив элементов вывода |
outputs[].url | string | URL сгенерированного артефакта |
outputs[].content_type | string | MIME-тип (например, image/png, video/mp4) |
error | object | null | Сведения об ошибке, если не удалось; null при успехе |
error.type | string | Код ошибки для машинной обработки |
error.message | string | Описание ошибки, понятное человеку |
Асинхронный workflow
Эта модель работает асинхронно. Отправьте запрос, затем опрашивайте результат.
- Отправка: выполните POST на /v1/run и прочитайте возвращаемое
id. - Опрос: выполняйте GET /v1/run/{id}, пока статус не станет
completed,failedилиtimeout. - Получение: прочитайте
outputsиз завершенного ответа.
Выберите свою модель
Сравнить модели
| Модель | Тип | Цена по умолчанию | Выпущена |
|---|---|---|---|
Index TTS 2.0Эта модель sandbase-ai | Аудио | $0.02 / запуск | 7 окт. 2025 г. |
SandBase AI | Аудио | $0.01 / запуск | 16 июн. 2026 г. |
SandBase AI | Аудио | $0.06 / запуск | 7 янв. 2026 г. |
SandBase AI | Аудио | $0.01 / запуск | 24 окт. 2025 г. |
SandBase AI | Аудио | $0.05 / запуск | 4 апр. 2025 г. |
SandBase AI | Аудио | $0.05 / запуск | 4 апр. 2025 г. |
Вопросы
FAQ
Как вызвать sandbase-ai Index TTS 2.0 через SandBase?
Создайте API key SandBase, затем отправляйте запросы с идентификатором модели "sandbase-ai/index-tts-2" на Unified Run API (/v1/run) по адресу https://api.sandbase.ai. Примеры запросов на этой странице показывают точный payload.
Нужен ли мне отдельный аккаунт sandbase-ai?
Нет. Один API key SandBase и один баланс дают вам доступ к sandbase-ai Index TTS 2.0 и другим моделям в каталоге; отдельно регистрироваться в sandbase-ai не нужно.
