aisplice

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/speech
POST/v1/audio/transcriptions
POST/v1/audio/translations

Speech 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

  • modelstringrequired

    tts-1 class for speech; whisper-1 class for transcription.

  • inputstringrequired

    speech only: the text to speak.

  • voicestringrequired

    speech only: voice name (alloy, nova, …); available voices per model card.

  • filefile (multipart)required

    transcriptions only: the audio file (mp3, wav, m4a, webm …).

  • languagestringoptional

    transcriptions only: ISO-639-1 hint that improves accuracy.

  • response_formatstringoptional

    speech: mp3 | wav | opus …; transcriptions: json | text | srt | verbose_json.

  • speednumberoptional

    speech 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.

Full error-code table →

#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.