---
title: "Text To Speech"
method: POST
path: "/api/audio/tts"
tags: ["audio"]
---

# Text To Speech

`POST /api/audio/tts`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/audio/tts`
- Auth: none declared

Convert text to MP3 audio via ElevenLabs Flash v2.5.

Voice resolution order:
  1. Explicit ``body.voice`` override.
  2. ``identities.tts_voice`` for ``body.speaker_identity_id`` (the
     message sender - agent or person).
  3. ``identities.tts_voice`` for the caller (legacy, no speaker passed).
  4. ``settings.elevenlabs_default_voice_id`` (synthesis-time fallback
     per TOS-205 spec §4.4).

Voice IDs are opaque ElevenLabs voice identifiers. ElevenLabs voices
are scoped by workspace: presets are universally visible, but Instant
Voice Clones and Voice Design clones live only in the owner's
workspace. When the caller's resolved key sits in a different
workspace than the message speaker's stored clone, the primary voice
404s. To stop the stream from blowing up, we pre-check speaker-derived
voices against the resolved key and fall back to ``tts_voice_backup``
(preset, always visible) → ``settings.elevenlabs_default_voice_id`` →
the platform fallback voice. See TOS-205 §G and TOS-911.

Returns 503 if no ElevenLabs key is configured.

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- TTSRequest
  - `text` string, required
  - `voice` string, nullable
  - `speaker_identity_id` string, uuid, nullable
  - `with_alignment` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/ce2c2ce318b1?raw)
