Audio
Omrouter supports text to speech, audio transcription, and audio translation. Enter the name of the corresponding audio model in each request.
Text to speech
Section titled “Text to speech”POST /v1/audio/speechAuthorization: Bearer OMROUTER_API_KEYContent-Type: application/jsoncurl --silent --show-error \ 'https://omrouter.com/v1/audio/speech' \ --header "Authorization: Bearer $OMROUTER_API_KEY" \ --header 'Content-Type: application/json' \ --data "{ \"model\": \"$OMROUTER_MODEL_ID\", \"input\": \"Hello from Omrouter.\", \"voice\": \"model-supported-voice\" }" \ --output speech.binCommon optional fields include response_format, speed, and instructions. Use only values documented for the selected model.
Transcription
Section titled “Transcription”POST /v1/audio/transcriptionsAuthorization: Bearer OMROUTER_API_KEYContent-Type: multipart/form-datacurl --silent --show-error \ 'https://omrouter.com/v1/audio/transcriptions' \ --header "Authorization: Bearer $OMROUTER_API_KEY" \ --form "model=$OMROUTER_MODEL_ID" \ --form 'file=@audio.mp3'Audio translation uses POST /v1/audio/translations with the same upload format. Supported file types and sizes depend on the selected model.