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.
- Prezzo base
- $0.02USD / esecuzione
- Esecuzione
- async
- Tipo di modello
- audio
- Campi di input
- 7
Prova il modello
Playground
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Scheda del modello
Specifiche
Prezzi
- Prezzo base
- $0.02 / esecuzione
Contesto e modalità
- Input
- Definito dallo schema
- Output
- audio
Funzionalità
- Chat
- Non supportato
- Vision
- Non supportato
- Ragionamento
- Non supportato
- Output strutturato
- Non supportato
- Chiamata di funzione
- Non supportato
- Input audio
- Non supportato
Accesso
- Provider
- sandbase-ai
- ID modello
- sandbase-ai/index-tts-2
- Esecuzione
- async
- URL base
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /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.
Inizia a costruire
Invia la tua prima richiesta
Endpoint compatibile con OpenAI con autenticazione unificata e tracciamento dell'utilizzo.
# 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"Schema di input
7 parametri · 2 obbligatori · 5 facoltativi
| Parametro | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
text | string | Obbligatorio | The text to speak. |
audio | string | Obbligatorio | Reference speech audio file or URL; the output is spoken in this voice (zero-shot cloning). |
strength | number | Facoltativo | Strength of the emotional style transfer. Higher values give stronger emotional influence. · Min: 0 · Max: 1 · Predefinito: 1 |
emotion_prompt | string | Facoltativo | Text whose emotion is used instead of the spoken text. Requires should_use_prompt_for_emotion. |
emotional_audio | string | Facoltativo | Optional audio file or URL whose emotional style is transferred to the output. |
emotional_strengths | object | Facoltativo | Per-emotion strengths (0-1) for fine-grained control: happy, angry, sad, afraid, disgusted, melancholic, surprised, calm. |
should_use_prompt_for_emotion | boolean | Facoltativo | Derive emotional strengths from the text (or from emotion_prompt when set). Overrides emotional_strengths. · Predefinito: false |
Schema di output
| Campo | Tipo | Descrizione |
|---|---|---|
id | string | Identificatore univoco dell'attività di generazione |
status | string | Stato dell'attività: pending, running, completed, failed, timeout |
model | string | Modello usato per la generazione |
outputs | array | Array di elementi di output |
outputs[].url | string | URL dell'artefatto generato |
outputs[].content_type | string | Tipo MIME (ad esempio image/png, video/mp4) |
error | object | null | Dettagli dell'errore in caso di fallimento, null in caso di successo |
error.type | string | Codice del tipo di errore leggibile dalla macchina |
error.message | string | Descrizione dell'errore leggibile dall'utente |
Workflow asincrono
Questo modello funziona in modo asincrono. Invia una richiesta, quindi esegui il polling per ottenere il risultato.
- Invio: esegui POST su /v1/run e leggi il
idrestituito. - Polling: esegui GET /v1/run/{id} finché lo stato non è
completed,failedotimeout. - Recupero: leggi
outputsdalla risposta completata.
Scegli il tuo modello
Confronta i modelli
| Modello | Tipo | Prezzo predefinito | Rilasciato |
|---|---|---|---|
Index TTS 2.0Questo modello sandbase-ai | Audio | $0.02 / esecuzione | 7 ott 2025 |
SandBase AI | Audio | $0.01 / esecuzione | 16 giu 2026 |
SandBase AI | Audio | $0.06 / esecuzione | 7 gen 2026 |
SandBase AI | Audio | $0.01 / esecuzione | 24 ott 2025 |
SandBase AI | Audio | $0.05 / esecuzione | 4 apr 2025 |
SandBase AI | Audio | $0.05 / esecuzione | 4 apr 2025 |
Domande
FAQ
Come chiamo sandbase-ai Index TTS 2.0 tramite SandBase?
Crea una chiave API SandBase, poi invia richieste con l'ID modello "sandbase-ai/index-tts-2" a Unified Run API (/v1/run) su https://api.sandbase.ai. Gli esempi di richiesta in questa pagina mostrano il payload esatto.
Mi serve un account sandbase-ai separato?
No. Una sola chiave API e un solo saldo SandBase ti danno accesso a sandbase-ai Index TTS 2.0 e agli altri modelli del catalogo; non è necessario registrarsi separatamente su sandbase-ai.
