# POST /v1/text-to-dialogue/with-timestamps (ElevenLabs API)
Base URL: https://api.elevenlabs.io
Auth: xi-api-key: <ELEVENLABS_API_KEY>
Last verified: 2026-09-03

> Text To Dialogue With Timestamps

## Critical Gotchas
* Authentication uses the non-standard `xi-api-key` header, not `Authorization: Bearer`. Sending a Bearer token returns HTTP 401.
* Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (`--output speech.mp3`) rather than parsing it.

## cURL
curl -X POST 'https://api.elevenlabs.io/v1/text-to-dialogue/with-timestamps?output_format=mp3_44100_128&enable_logging=true' \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"inputs":[{}],"model_id":"eleven_v3"}'

## Parameters
| Name | In | Type | Required | Description |
| :--- | :--- | :--- | :--- | :--- |
| inputs | body | object[] | Yes | A list of dialogue inputs, each conta... |
| output_format | query | string | No | Output format of the generated audio.... |
| enable_logging | query | boolean | No | When enable_logging is set to false z... |

## Response (200 OK)
{"alignment":{"character_end_times_seconds":[],"character_start_times_seconds":[]},"audio_base64":"base64_encoded_audio_string"}

---
Need an API key? Get one at https://elevenlabs.io/app/sign-up