Create Audio Speech
Audio
Create Audio Speech
Generate audio speech from text using text-to-speech models
POST
Create Audio Speech
Generate audio speech from text.
This endpoint converts text to speech using the Morpheus Network providers. It automatically manages sessions and routes requests to the appropriate TTS model.
Returns binary audio data in the specified format.
Swagger UI may not be able to play the audio directly. To test, click “Download” and play the file in your media player, or use curl to save the audio file.
Headers
string
required
API key in format:
Bearer sk-xxxxxxBody
string
required
Text to convert to speech.Example:
string
Model ID to use for speech generation (blockchain hex address or name).
Use the List Models endpoint to see available TTS models.
string
default:"af_alloy"
Voice to use for speech generation. Available voices depend on the selected model.
string
default:"mp3"
Audio format for the response. Options:
mp3, opus, aac, flac, wav, pcmnumber
default:"1"
Speech speed multiplier. Range typically 0.25 to 4.0, where 1.0 is normal speed.
string
Optional session ID to use for this request. If not provided, the system will automatically create or use the session associated with the API key.
Response
The endpoint returns binary audio data in the requested format. The content type will match theresponse_format parameter (e.g., audio/mpeg for mp3, audio/wav for wav).
string
Audio MIME type matching the requested format:
audio/mpegfor mp3audio/opusfor opusaudio/aacfor aacaudio/flacfor flacaudio/wavfor wavaudio/pcmfor pcm
binary
Binary audio file data
Example Request
Use Cases
Accessibility
Convert text content to audio for visually impaired users
Content Creation
Generate voiceovers for videos, podcasts, and multimedia content
Interactive Applications
Add voice responses to chatbots and virtual assistants
Language Learning
Create pronunciation guides and language learning materials

