Create speech
Speaks text aloud and returns the audio file. With a test key the audio is a second of silence, as WAV, and nothing is charged.
Speaks text aloud and returns the audio file. With a test key the audio is a second of silence, as WAV, and nothing is charged.
apiKeyAuthorizationBearer <token>Your API key, starting with upsky_test_ or upsky_live_.
application/json- body
OpenAI's speech format. Other fields are ignored.
model*stringA speech model ID from GET /v1/ai/models?type=speech.
1 <= length <= 200input*stringThe text to speak, up to 5,000 characters. Each character is charged.
1 <= length <= 5000voice?stringThe voice to speak in. Each provider has its own, such as alloy for OpenAI. Without one, the model's default.
1 <= length <= 200response_format?stringThe audio format. Models that can't make it answer in their own, so read the Content-Type header.
"mp3""opus""aac""flac""wav""pcm"instructions?stringHow to speak, such as tone or pace, on models that support it.
length <= 4096speed?numberFrom 0.25 to 4. Defaults to 1, on models that support it.
0.25 <= value <= 4language?stringThe language of the text, such as en, when it matters.
2 <= length <= 35[key: string]?unknownThe audio. Upsky-Cost says what it was charged, in US dollars, and Upsky-Characters how many characters were.
response?filebinarycurl -X POST 'https://api.upsky.dev/v1/ai/audio/speech' \ -H 'Content-Type: application/json' \ -d '{ "model": "string", "input": "string", "property1": null, "property2": null}'"string"