A sentence, as sound
POST
/api/speak
const url = 'http://localhost:5173/api/speak';const options = { method: 'POST', headers: { cookie: 'authjs.session-token=<authjs.session-token>', 'Content-Type': 'application/json' }, body: '{"serverId":"example","model":"example","voice":"example","text":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:5173/api/speak \ --header 'Content-Type: application/json' \ --cookie authjs.session-token=<authjs.session-token> \ --data '{ "serverId": "example", "model": "example", "voice": "example", "text": "example" }'JSON in, audio bytes out, and nothing kept at either end. The sound exists for the length of the response and is played from a blob the page drops when it is done; there is deliberately no cache, since caching would mean writing down what somebody was told. The connection is resolved and the key injected here, so the browser never learns either.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
serverId
required
string
model
required
string
voice
required
A voice name the provider knows.
string
text
required
One piece
string
Examplegenerated
{ "serverId": "example", "model": "example", "voice": "example", "text": "example"}Responses
Section titled “Responses”The audio, in whatever playable type the provider answered with.
Media typeaudio/mpeg
string format: binary
Missing parameters
Over the credit ceiling
More text than this app will send in one piece.
The provider could not be reached
The provider took longer than this app is willing to wait.

