Usage > V1 > OpenAI-compatible

Create transcription

Transcribes audio into the input language. <br> The input format is the same as OpenAI, see the OpenAI documentation. <br> This route is asynchronous, use<br>GET /1/ai/{product_id}/results/{batch_id} to get the result<br>GET /1/ai/{product_id}/results/{batch_id}/download to download the output once done<br>

post/1/ai/{product_id}/openai/audio/transcriptions

Path parameters

product_idinteger required

AI Tools product identifier: use GET /1/ai to retrieve your product identifier.

Request body

append_punctuationsstring

Only if timestamp_granularities[]:word is True, merge these punctuation symbols with the previous word

chunk_lengthinteger

Defines the maximum duration for an active segment in sec. For subtitle tasks, it's recommended to set this to a short duration (5-10 seconds) to avoid long sentences.

filestring binary required

The audio file to transcribe.<br>Its size must be less than Max lengh in kilobytes.<br>Allowed types: mp3,mp4,aac,wav,flac,ogg,opus,wma,m4a,webm.

highlight_wordsboolean

Subtitle task. Underline each word as it is spoken in srt and vtt output formats (requires timestamp_granularities[]:word)

language'af' | 'am' | 'ar' | 'as' | 'az' | 'ba' | 'be' | 'bg' | 'bn' | 'bo' | 'br' | 'bs' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'gl' | 'gu' | 'ha' | 'haw' | 'he' | 'hi' | 'hr' | 'ht' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'jw' | 'ka' | 'kk' | 'km' | 'kn' | 'ko' | 'la' | 'lb' | 'ln' | 'lo' | 'lt' | 'lv' | 'mg' | 'mi' | 'mk' | 'ml' | 'mn' | 'mr' | 'ms' | 'mt' | 'my' | 'ne' | 'nl' | 'nn' | 'no' | 'oc' | 'pa' | 'pl' | 'ps' | 'pt' | 'ro' | 'ru' | 'sa' | 'sd' | 'si' | 'sk' | 'sl' | 'sn' | 'so' | 'sq' | 'sr' | 'su' | 'sv' | 'sw' | 'ta' | 'te' | 'tg' | 'th' | 'tk' | 'tl' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'vi' | 'yi' | 'yo' | 'yue' | 'zh'

The language of the input audio. Supplying the input language will translate the output.

max_line_countinteger

Subtitle task. The maximum number of lines in a segment in srt and vtt output formats (requires timestamp_granularities[]:word)

max_line_widthinteger

Subtitle task. The maximum number of characters in a line before breaking the line in srt and vtt output formats (requires timestamp_granularities[]:word)

max_words_per_lineinteger

Subtitle task. The maximum number of words in a segment (requires timestamp_granularities[]:word)

modelstring required

Model name to use

no_speech_thresholdnumber double

If the no_speech probability is higher than this value AND the average log probability over sampled tokens is below log_prob_threshold, consider the segment as silent.

prepend_punctuationsstring

Only if timestamp_granularities[]:word is True, merge these punctuation symbols with the next word

promptstring

An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.

response_format'json' | 'srt' | 'text' | 'verbose_json' | 'vtt'

The format of the transcript output (default: json)

timestamp_granularitiesstring[]

The timestamp granularities to populate for this transcription. Either or both of these options are supported: word, or segment. Requires response_format=verbose_json. Defaults to segment.

Example request

{
  "append_punctuations": "\"'.。,,!!??::”)]}、",
  "file": "@foo/bar.mp3",
  "language": "en",
  "model": "whisper",
  "prepend_punctuations": "\"'“¿([{-",
  "response_format": "text"
}

Response

OK

batch_idstring required

The id of the batch dispatched handling the transcription.

Example response

{
  "batch_id": "9b9fec49-cc95-44d5-8d3a-be56a6e05970"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.