IronFlowDocs

transcribe

Transcribe an audio or video file to VTT, SRT, plain text, or verbose JSON via OpenAI, an OpenAI-compatible endpoint, or Azure OpenAI.

Parameters

pathstringconditional
Path to the audio/video file to transcribe. Supports ${ctx.key} interpolation. Mutually exclusive with source_key; exactly one of the two is required.
source_keystringconditional
Context key holding the file path as a string. Mutually exclusive with path.
providerstringdefault "openai"
Transcription backend: "openai", "openai_compatible", or "azure".
formatstringdefault "vtt"
Transcript format: "vtt", "srt", "text", or "json". See [Formats](#formats) below.
modelstringdefault "whisper-1"
Model name. Supports ${ctx.key} interpolation; has no environment-variable fallback. For provider = "azure" this is the **deployment name**, not a model ID — see [Azure](#azure).
api_keystringconditional
API key/token. Required via config or the fallback environment variable for every provider — see [Environment Variable Fallbacks](#environment-variable-fallbacks).
base_urlstringconditionaldefault provider-dependent
Base URL of the transcription endpoint. Falls back to an environment variable. Defaults to https://api.openai.com/v1 for openai/openai_compatible when neither is set; azure has no default and fails without one.
api_versionstringconditional
Azure api-version query parameter. Required (via config or AZURE_OPENAI_API_VERSION) only when provider = "azure"; not used otherwise.
languagestring
ISO-639-1 language hint forwarded to the provider. Supports ${ctx.key} interpolation; has no environment-variable fallback.
promptstring
Free-text hint to bias vocabulary or style, forwarded to the provider as-is. Supports ${ctx.key} interpolation; has no environment-variable fallback.
temperaturenumber
Sampling temperature forwarded to the provider. Read as a plain number; not interpolated.
output_keystringdefault "transcript"
Prefix for context output keys.
output_filestring
When set, the raw provider response body is written to this path and {output_key}_path is added to the output. Supports ${ctx.key} interpolation.
timeoutnumberdefault 120
Request timeout in seconds. Must be greater than zero.

The audio file is read from disk before it is uploaded, capped at IRONFLOW_MAX_AUDIO_BYTES (default 25,000,000 bytes / 25 MB). A file over the cap fails the step before any network request is made; see CLI_REFERENCE.md for the environment variable.

Formats

formatProvider response_format sentOutput value
"vtt" (default)vttRaw WebVTT text
"srt"srtRaw SubRip text
"text"textRaw plain text
"json"verbose_jsonParsed JSON object

format = "json" does not request the provider's bare json mode — it requests verbose_json. The returned value is therefore a full object that typically includes text, segments (per-segment timing), duration, and the detected language, not just a transcript string. The exact fields present depend on what the provider returns; IronFlow parses the body as JSON and passes it through unchanged.

The requested format is always echoed back on {output_key}_format using its own label ("vtt", "srt", "text", or "json") — {output_key}_format reads "json" even though the wire request used verbose_json.

Environment Variable Fallbacks

Config KeyEnvironment VariableProvider
api_keyOPENAI_API_KEYopenai / openai_compatible
base_urlOPENAI_BASE_URLopenai / openai_compatible
api_keyAZURE_OPENAI_API_KEYazure
base_urlAZURE_OPENAI_ENDPOINTazure
api_versionAZURE_OPENAI_API_VERSIONazure

api_key and base_url are read through a config-value-then-environment-variable fallback for every provider; azure additionally requires api_version through the same pattern. model, language, and prompt have no environment-variable fallback — they are config-only (with ${ctx.key} interpolation) to keep the environment contract limited to credentials and endpoints.

Azure

For provider = "azure", model is not a model identifier — it is the deployment name, and it is placed directly in the request URL path:

{base_url}/openai/deployments/{model}/audio/transcriptions?api-version={api_version}

Because Azure selects the model through the URL, the model field is also omitted from the uploaded form body for this provider (some deployments reject a redundant model field). Always set model explicitly to your deployment name when using Azure — the "whisper-1" default is very unlikely to match a real deployment name.

Azure authenticates with an api-key header instead of the Authorization: Bearer header used by openai/openai_compatible; this node handles that automatically based on provider.

Context Output

With the default output_key of "transcript", the keys are transcript, transcript_format, transcript_model, transcript_success, and — only when output_file is set — transcript_path.

KeyTypeDescription
{output_key}string or objectThe transcript. For vtt/srt/text, the raw response body string. For json, the parsed verbose-JSON object (see Formats).
{output_key}_formatstringThe requested format label: "vtt", "srt", "text", or "json".
{output_key}_modelstringThe model value used for the request.
{output_key}_successbooleanAlways true. Any failure (missing credentials, transport error, non-2xx response, empty body, unparseable JSON) returns a node error instead.
{output_key}_pathstringOnly present when output_file is set. The path the raw response body was written to.

Errors from this node never contain the API key: the provider's raw error text is scanned for the exact key value sent on the request and any occurrence is replaced with [REDACTED], in addition to the shared pattern-based credential redaction applied to transport and parse errors.

Examples

OpenAI, plain text

flow:step("transcribe", nodes.transcribe({
    path = "${ctx.audio_path}",
    format = "text",
    output_key = "transcript"
}))

flow:step("log_result", nodes.log({
    message = "Transcript: ${ctx.transcript}"
})):depends_on("transcribe")

Azure OpenAI

flow:step("transcribe", nodes.transcribe({
    provider = "azure",
    path = "${ctx.audio_path}",
    model = "my-whisper-deployment", -- deployment name, not a model ID
    api_version = "2024-06-01",
    output_key = "transcript"
}))

Verbose JSON (segments, duration, detected language)

flow:step("transcribe", nodes.transcribe({
    path = "${ctx.audio_path}",
    format = "json",
    output_key = "transcript"
}))

flow:step("log_result", nodes.log({
    message = "Detected language: ${ctx.transcript.language}, duration: ${ctx.transcript.duration}s"
})):depends_on("transcribe")

Writing the transcript to a file for a downstream extractor

flow:step("transcribe", nodes.transcribe({
    path = "${ctx.audio_path}",
    format = "vtt",
    output_key = "transcript",
    output_file = "${ctx.audio_path}.vtt",
    timeout = 300
})):retries(2, 2):timeout(300)

-- extract_vtt reads a file, which is why transcribe wrote one.
flow:step("cues", nodes.extract_vtt({
    path = "${ctx.transcript_path}",
    cues_key = "cues"
})):depends_on("transcribe")

IronFlow documentation

Find the next step

Type a keyword to search the documentation.

to move · Enter to open · Esc to close