Recipes

Live transcription

Changed on

Transcribes speech while it is recorded: append audio to <c>output.inputUrl</c> and read text from /// <c>output.transcriptUrl</c> as it decodes. Billed per second of audio once the session ends.

post/v2/consumer/recipes/liveTranscription

Request

  • The document declares no server URL.
  • Auth: none required

Query parameters

experimentalboolean
allowMatureContentboolean
whatifboolean
ephemeralboolean
tier'paid' | 'free'

How a workflow is paid for.

Request body

languagestring nullable

Language of the speech (e.g., "en", "zh"). Send it: without it the model assumes English and invents English text for other languages.

contextstring nullable

Optional context prompt to improve transcription accuracy.

maxDurationSecondsinteger

The session ends after this many seconds of audio, even if the input is still open. The upfront balance check covers this much audio.

idleTimeoutSecondsinteger

The input is treated as closed when no audio arrives for this many seconds, so a client that disappears does not hold the session open.

Response

OK

inputUrlstring uri required

POST raw PCM (s16le, 16 kHz, mono) here in chunks numbered ?seq=0,1,…, with final=true on the last.

inputUrlExpiresAtstring date-time required
transcriptUrlstring uri required

NDJSON transcript events: partial replaces the open segment's text, final commits it, and done ends the stream with the whole transcript.

textstring nullable

The whole transcript, once the session has ended.

audioSecondsnumber double required

Seconds of audio received so far; the session is billed on this.

Changes