Audio
1. Text to Speech
Generate audio from text.
- Endpoint:
POST https://api.luvr.ai/v1/audio/speech
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
text | String | Yes | Text to speak. |
voice_id | String | No | Default voice if omitted. |
Response
{
"audio": "base64_mp3_data...",
"format": "mp3",
"cost_usd": 0.01,
"timestamp": 1709823456
}2. Get Voices
Returns the list of available TTS voices.
- Endpoint:
GET https://api.luvr.ai/v1/audio/voices
Response
{
"voices": [
{ "id": "e7f3af7c-...", "name": "Default" },
{ "id": "7252ca53-...", "name": "Voice 2" }
]
}