Skip to main content
POST
/
v1
/
audio
/
speech
स्पीच जेनरेट करें
curl --request POST \
  --url https://api.dedaluslabs.ai/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>",
  "voice": "alloy",
  "instructions": "<string>",
  "response_format": "mp3",
  "speed": 1,
  "stream_format": "sse"
}
'
"<string>"

Overview

Generate audio from text using text-to-speech models. Currently supports OpenAI’s TTS models with multiple voice options. Note: OpenAI only endpoint.

Usage Examples

curl -X POST https://api.dedaluslabs.ai/v1/audio/speech \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/tts-1",
    "input": "Hello, this is a test of text to speech.",
    "voice": "alloy"
  }' \
  --output speech.mp3

Authorizations

Authorization
string
header
required

Bearer टोकन के माध्यम से API कुंजी का प्रमाणीकरण

Body

application/json

टेक्स्ट से ऑडियो जनरेट करने के लिए किया गया request।

model
string
required

उपलब्ध TTS मॉडल में से कोई एक: openai/tts-1, openai/tts-1-hd या openai/gpt-4o-mini-tts

Examples:

"openai/tts-1"

"openai/tts-1-hd"

input
string
required

वह टेक्स्ट जिसके लिए ऑडियो उत्पन्न करना है। अधिकतम लंबाई 4096 कैरेक्टर है।

Example:

"Hello, how are you today?"

voice
enum<string>
required

ऑडियो जेनरेट करते समय उपयोग की जाने वाली voice का नाम। समर्थित voices हैं alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, और verse। इन voices का प्रीव्यू आप Text to speech guide में देख सकते हैं।

Available options:
alloy,
ash,
ballad,
coral,
echo,
fable,
onyx,
nova,
sage,
shimmer,
verse
Examples:

"alloy"

"nova"

instructions
string | null

अतिरिक्त निर्देशों के ज़रिए अपने जेनरेट किए गए ऑडियो की आवाज़ को नियंत्रित करें। tts-1 या tts-1-hd के साथ संगत नहीं है।

response_format
enum<string> | null

ऑडियो के लिए आउटपुट फ़ॉर्मेट। समर्थित फ़ॉर्मेट हैं mp3, opus, aac, flac, wav और pcm

Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
Example:

"mp3"

speed
number | null

जेनरेट किए गए ऑडियो की गति। 0.25 से 4.0 के बीच कोई मान चुनें। 1.0 डिफ़ॉल्ट है।

Required range: 0.25 <= x <= 4
Example:

1

stream_format
enum<string> | null

ऑडियो को स्ट्रीम करने के लिए उपयोग किया जाने वाला फ़ॉर्मेट। समर्थित फ़ॉर्मेट sse और audio हैं। tts-1 या tts-1-hd के लिए sse समर्थित नहीं है।

Available options:
sse,
audio
Example:

"sse"

Response

ऑडियो फ़ाइल स्ट्रीम

The response is of type file.

Last modified on April 15, 2026