---
title: "Tts Preview"
method: POST
path: "/api/voice/tts/preview"
tags: ["voice", "voice"]
---

# Tts Preview

`POST /api/voice/tts/preview`

## Request

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

Synthesize a short voice sample for the agent-settings voice picker.

Resolution order for the sample text:
  1. Explicit `text` field (if provided — for ad-hoc previews)
  2. `agent.execution_config.voice_greeting` when `agent_id` is set
  3. Fallback phrase looked up by voice → language map

## Request body

- TTSPreviewRequest
  - `provider` string, required
  - `voice` string, required
  - `speed` number
  - `agent_id` integer, nullable
  - `language` string, nullable
  - `text` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
