API reference
Audio
No model serves this yet
Nothing in the model catalogue supports this route right now. The page stays for reference.
POST
/v1/audio/speechPOST
/v1/audio/transcriptionsPOST
/v1/audio/translationsSpeech both ways: /v1/audio/speech synthesizes text into audio bytes; /v1/audio/transcriptions turns audio into text (Whisper-compatible); /v1/audio/translations transcribes straight into English.
#Request parameters
modelstringrequiredtts-1 class for speech; whisper-1 class for transcription.
inputstringrequiredspeech only: the text to speak.
voicestringrequiredspeech only: voice name (alloy, nova, …); available voices per model card.
filefile (multipart)requiredtranscriptions only: the audio file (mp3, wav, m4a, webm …).
languagestringoptionaltranscriptions only: ISO-639-1 hint that improves accuracy.
response_formatstringoptionalspeech: mp3 | wav | opus …; transcriptions: json | text | srt | verbose_json.
speednumberoptionalspeech only: 0.25–4.0 playback speed.
Two different content types
speech takes a JSON body and returns raw audio bytes; transcriptions/translations take multipart/form-data and return JSON. Don’t mix the two.
#Related errors
- 413 payload_too_largeRequest body (prompt, image, or audio file) exceeds the accepted size.
- 401Invalid or missing bearer token. No error.code on this path — match the status.
- 402 insufficient_user_quotaWallet balance cannot cover the pre-reserved estimate.
- 429Per-key throttle. Empty body; wait for Retry-After. A 429 that does carry insufficient_user_quota is a daily spend cap instead.
- 503 model_not_foundUnknown model, or no healthy channel serves it right now.
#Request example
# text → speech (bytes saved to file)
curl https://www.aisplice.store/v1/audio/speech \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "tts-1", "voice": "alloy", "input": "Hello from the gateway."}' \
--output hello.mp3
# speech → text (multipart)
curl https://www.aisplice.store/v1/audio/transcriptions \
-H "Authorization: Bearer sk-YOUR_KEY" \
-F file=@meeting.mp3 -F model=whisper-1#Response
response.json
// /v1/audio/speech → binary audio body (Content-Type: audio/mpeg)
// /v1/audio/transcriptions
{"text": "…transcript…"}Still stuck?
Send us the request ID or the error message and we will look into it.