Skip to content

Audio ​

The image and audio interfaces are used to generate images, edit images, transcribe speech, translate speech, and convert text to speech. Availability depends on the model, channel, and upstream service.

MethodPathDescription
POST/v1/audio/transcriptionsAudio transcription
POST/v1/audio/translationsAudio translation
POST/v1/audio/speechText to speech

Common fields include model, file, input, voice, format, response_format, and timestamp_granularities.

File Restrictions ​

File size, format, duration, output type, and streaming audio support are determined by the upstream service. If a request fails, check whether the file is too large, whether the Content-Type is correct, and whether the model supports the target capability.

Transcription Example ​

bash
curl https://api.cloudaikit.com/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-your-token" \
  -F "file=@audio.mp3" \
  -F "model=whisper-1"

The models and fields used for speech transcription, translation, and text-to-speech may differ. Before uploading a file, confirm its format and size limits, and verify that the client is correctly sending multipart/form-data.