sonixdocs

Speech to text

OpenAI-compatible transcription and translation over multipart/form-data.

POST /v1/audio/transcriptions

Transcribes audio in its source language.

curl "$SONIX_URL/v1/audio/transcriptions" \
  -H "Authorization: Bearer $SONIX_API_KEY" \
  -F model="whisper-tiny" \
  -F file=@meeting.wav
{ "text": "transcribed text" }
FieldRequiredNotes
modelyesA transcription-capable model ID.
fileyesThe audio upload. WAV, or headerless PCM sent as audio/pcm or audio/L16.
languagenoSource language hint.
promptnoContext to guide the transcript.
temperaturenoSampling temperature.
response_formatnojson (default), text, or verbose_json.
timestamp_granularities[]noWith verbose_json, adds words / segments arrays.

srt and vtt formats are rejected until timestamped transcripts are implemented.

Uploads must be WAV, or headerless PCM declared as audio/pcm or audio/L16. Any other container — mp3, flac, m4a, ogg — is rejected with a validation error naming file. Convert to 16 kHz mono WAV before sending.

POST /v1/audio/translations

Same shape, but translates the audio to English and rejects the transcription-only fields (language, timestamp_granularities[]). verbose_json responses carry task: "translate" alongside text.

curl "$SONIX_URL/v1/audio/translations" \
  -H "Authorization: Bearer $SONIX_API_KEY" \
  -F model="whisper-tiny" \
  -F file=@bonjour.wav
{ "text": "translated text" }