Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Diarize | *bool | :heavy_minus_sign: | Label each word with the speaker who said it. Speaker labels are returned on the words array (speaker, speaker_label), so response_format must be “verbose_json” (a “json” request is rejected with a 400) and word timestamps are included even when timestamp_granularities omits “word”. Only supported by some providers; the request is rejected with a 400 when the selected model cannot diarize. Providers may charge extra. | true |
InputAudio | components.STTInputAudio | :heavy_check_mark: | Audio to transcribe: inline base64 bytes, or a URL the provider downloads directly. | |
Keyterms | []string | :heavy_minus_sign: | Domain terms, names, or phrases to bias recognition toward. Only supported by some providers; the request is rejected with a 400 when the selected model cannot use keyterms. Providers may cap the number of terms or characters per term and may charge extra. | [ “OpenRouter”, “Scribe” ] |
Language | *string | :heavy_minus_sign: | ISO-639-1 language code (e.g., “en”, “ja”). Auto-detected if omitted. | en |
Model | string | :heavy_check_mark: | STT model identifier | openai/whisper-large-v3 |
Provider | *components.STTRequestProvider | :heavy_minus_sign: | Provider-specific passthrough configuration | |
ResponseFormat | *components.STTRequestResponseFormat | :heavy_minus_sign: | Output format. “json” (default) returns { text, usage }. “verbose_json” additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers. | json |
SessionID | *string | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | session-1234 |
Temperature | *float64 | :heavy_minus_sign: | Sampling temperature for transcription | 0 |
TimestampGranularities | []components.STTTimestampGranularity | :heavy_minus_sign: | Timestamp detail levels to include when response_format is “verbose_json”. “segment” returns segment-level timestamps; “word” additionally returns word-level timestamps in the words array. Ignored unless response_format is “verbose_json”. | [ “segment” ] |
Trace | *components.TraceConfig | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | { “trace_id”: “trace-abc123”, “trace_name”: “my-app-trace” } |
User | *string | :heavy_minus_sign: | A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. | user-1234 |