API endpoint https://northerninference.ca/v1 Use your exact NI audio route key.

Speech and transcription

Generate speech from text or transcribe an audio file through the same NI control plane and custody record used by text requests.

Choose an exact audio route

Open Models and copy a route marked Text to speech or Speech to text. The route type must match the endpoint. NI rejects an audio request sent to a chat, image, or opposite-direction audio route instead of guessing.

Generate speech

Set TTS_ROUTE to the exact text-to-speech route shown in the model catalog. Voice names and response formats are provider-specific.

export TTS_ROUTE='paste the exact text-to-speech route from /models'
curl -sS https://northerninference.ca/v1/audio/speech -H "Authorization: Bearer $NI_API_KEY" -H "Content-Type: application/json" -d '{"model":"'"$TTS_ROUTE"'","input":"Northern Inference audio check.","voice":"Kore","response_format":"wav"}' --output speech.wav

A successful response is binary audio. NI preserves the provider content type and request ID headers; it does not wrap the audio in JSON.

Transcribe audio

Set STT_ROUTE to an exact speech-to-text route. The uploaded file remains multipart binary data while NI replaces only the route field used for provider dispatch.

export STT_ROUTE='paste the exact speech-to-text route from /models'
curl -sS https://northerninference.ca/v1/audio/transcriptions -H "Authorization: Bearer $NI_API_KEY" -F "model=$STT_ROUTE" -F "file=@sample.wav" -F "response_format=json"

Billing and request records

PII substitution

Optional text PII substitution is not available for audio endpoints. An audio request with PII substitution enabled fails closed before provider dispatch, because applying a text transform to binary audio would not protect the content.

Errors stay distinct

Malformed multipart data, a missing model field, an unknown route, a route-type mismatch, duration-decoder failure, timeout, provider rejection, and an actual empty provider response are recorded and returned as different failure states. NI does not convert any of them into empty audio, an empty transcript, or a zero-duration success.


Spot a problem? Let us know.