POST /tts
Convert text into natural-sounding speech using various TTS models from different providers. Supports multiple languages, voices, and customization options including speed control, voice instructions, and audio format selection.
Request
- Base URLhttps://api.nano-gpt.com/api
- URLhttps://api.nano-gpt.com/api/tts
- AuthAPI key in header x-api-key
Request body
Example request
{
"text": "Hello! This is a test of the text-to-speech API.",
"voice": "af_bella",
"instructions": "speak with enthusiasm"
}Response
Text-to-speech response. Returns either JSON with audio URL or binary audio data depending on the model.
Example response
{
"audioUrl": "https://storage.url/audio-file.wav",
"contentType": "audio/wav"
}Changes
No recorded changes to this operation across all 2 revisions of this API.