Elevenlabs Eleven V3 Timing API Documentation
Playground
Try it on WaveSpeedAI!ElevenLabs Eleven V3 Timing converts text to expressive speech and returns character-level alignment timestamps for subtitles, highlighting, and audio editing. Supports preset or custom voice IDs and adjustable stability.
Features
Eleven V3 (Alignment) turns text into natural speech and, at the same time, returns precise timing data for every character and word. You get an audio file plus alignment metadata, so you can drop the voice straight onto a timeline for subtitles, karaoke, lip-sync and fine-grained editing.
🎧 What this model does
- Generates high-quality speech with natural pronunciation, pacing and intonation.
- Returns alignment metadata with per-character / per-word timestamps (start–end in seconds).
- Makes it easy to build auto-subtitles, word-highlighting, reading trainers, talking avatars and precise dubbing tools.
Compared with a normal TTS model (audio only), this version also outputs an alignment object containing, for example:
- a list of characters or words
- corresponding end times in seconds (and, where available, start times)
so the text and audio are tightly locked to each other.
🧩 Typical uses
- Automatic subtitle generation with timecodes (SRT / VTT).
- Word-by-word highlighting or karaoke-style lyrics.
- Lip-sync for digital humans or 2D/3D characters driven by word/phoneme timing.
- Precise VO replacement and edit point detection inside existing videos.
- Language-learning apps: follow-along reading, shadowing and pronunciation practice.
🔧 Input parameters
-
text (required) – Script to be spoken. 1–5,000 characters per call. Use [pause], [short pause], or [long pause] for expressive pauses.
-
voice_id (required) – Which Eleven voice to use (for example: Alicia, Darian, Eldrin).
-
Full voice list to find your voice_id.
-
stability (0–1) – Higher values give more consistent delivery; lower values allow more expressive variation.
📤 Output format
Each run returns:
-
audio – URL of the generated audio file (MP3).
-
alignment – JSON metadata including:
-
list of characters and/or words in order
-
corresponding timing arrays (for example character_end_times_seconds) with values in seconds
You can parse this metadata to:
- build subtitles with exact in/out times
- drive on-screen highlighting in sync with the audio
- control animation, lip-sync or visual effects based on specific words
💰 Pricing
Billed by the exact character count of the input text, prorated — no rounding up to 1,000.
- Rate: $0.20 per 1,000 characters ($200 per 1M characters)
- No minimum charge; a 100-character request costs $0.020
| Characters | Cost |
|---|---|
| 100 | $0.020 |
| 500 | $0.10 |
| 1,000 | $0.20 |
| 5,000 | $1.00 |
🚀 How to use
- Fill text with your script.
- Select a voice_id from the supported ElevenLabs voices.
- Optionally adjust stability to control delivery.
- Run the request.
- Download the audio file and read the alignment JSON to build subtitles, highlights or animation timing.
📝 Notes and tips
- Punctuation matters: clear sentence boundaries improve rhythm and alignment accuracy.
- For very long scripts, split them into several calls if you need section-level control on the timeline.
- If you see errors like “invalid voice id”, cross-check with the most recent voice list and update the parameter value.
- When building players or editors, always treat the alignment timings (in seconds) as the single source of truth for where each character or word should appear.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"text": "A clear example input",
"voice_id": "Alicia",
"stability": 0.5
}
JSON
)
# 1. Submit the prediction once. Never retry this request automatically:
# a retry after an unclear failure can create a second, billed task.
CHECK='The task may already exist. Check History or the predictions list before submitting again.'
if ! SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 60 \
-X POST "https://api.wavespeed.ai/api/v3/elevenlabs/eleven-v3/timing" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}"); then
printf 'Submit failed. %s\n' "${CHECK}" >&2
exit 1
fi
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id. %s\n' "${CHECK}" >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction reaches a final status.
BODY_FILE=$(mktemp)
trap 'rm -f "${BODY_FILE}"' EXIT
while true; do
# Transient errors (429, 5xx) are retried, honoring Retry-After.
HTTP_CODE=$(curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 60 --retry 5 --retry-delay 2 \
--output "${BODY_FILE}" --write-out '%{http_code}' \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" || true)
case "${HTTP_CODE}" in
2??) ;;
000|429|5??) # dropped connection or temporary error: keep polling
printf 'Task %s: HTTP %s, polling again in 10s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
sleep 10; continue ;;
*) printf 'Task %s: HTTP %s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
cat "${BODY_FILE}" >&2; exit 1 ;;
esac
RESULT=$(jq 'if type == "object" and has("data") then .data else . end' "${BODY_FILE}")
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted)
printf 'Task %s ended with status %s\n' "${PREDICTION_ID}" "${STATUS}" >&2
printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneRetry temporary errors only while polling, never the submit request. Errors, retries and timeouts
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| text | string | Yes | - | 1 ~ 5000 characters | Text to convert to speech. Maximum 5,000 characters. Use [pause], [short pause], or [long pause] for expressive pauses. |
| voice_id | string | Yes | Alicia | - | The voice to use for speech generation. Choose a preset voice name, or enter any ElevenLabs voice ID. |
| stability | number | No | 0.5 | 0 ~ 1 | Voice stability (0-1) Default value: 0.5 |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |