The Audio API provides a speech endpoint based on our TTS (text-to-speech) model. It comes with 6 built-in voices and can be used to:Narrate a written blog post Produce spoken audio in multiple languages Give real time audio output using streamingGenerates audio from the input text.将输入文本转录为音频。
Request
Header Params
Body Params application/json
Example
{"model":"tts-1","input":"The quick brown fox jumped over the lazy dog.","voice":"alloy"}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.modelless.co/v1/audio/speech' \
--header'Authorization: Bearer ' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}'
Responses
🟢200OK
application/json
Body
Example
{"model":"tts-1","input":"The quick brown fox jumped over the lazy dog.","voice":"alloy"}