Legs

Start real-time speech-to-text on a leg

post/legs/{id}/stt

Request body

languagestring required

Language code (e.g. "en", "es")

partialboolean required

Emit partial (non-final) transcripts

provider'elevenlabs' | 'deepgram' | 'deepgram_flux' | 'azure' | 'speechmatics'

STT provider: "elevenlabs" (default), "deepgram" (/v1/listen), "deepgram_flux" (/v2/listen, conversational turn detection), "azure" or "speechmatics"

api_keystring

API key override (falls back to ELEVENLABS_API_KEY, DEEPGRAM_API_KEY, AZURE_SPEECH_KEY or SPEECHMATICS_API_KEY env var depending on provider)

modelstring

Provider-specific model. Deepgram: default "nova-3". Deepgram Flux: "flux-general-en" (default) or "flux-general-multi". Speechmatics: "standard" (default) or "enhanced".

keytermsstring[]

Terms to boost recognition of (Deepgram, Deepgram Flux, and Speechmatics — where they become additional_vocab).

endpointinginteger

Deepgram: milliseconds of silence before a segment is finalized; 0 disables endpointing. Speechmatics: maps to max_delay, clamped to 700-4000 ms; 0 leaves the provider default.

utterance_end_msinteger

Deepgram: milliseconds of silence after which an stt.turn event with event=utterance_end is emitted. Deepgram requires interim results for this, which are requested automatically and still suppressed unless partial is true. Speechmatics: milliseconds of silence that close a turn and emit an stt.turn event with event=end_of_turn — default 600, capped at 2000, and 0 disables turn detection.

eager_eot_thresholdnumber

Deepgram Flux only: end-of-turn confidence that fires an eager_end_of_turn stt.turn event, enabling speculative generation. Must be between 0.3 and 0.9. When unset, no eager_end_of_turn or turn_resumed events are emitted at all.

eot_thresholdnumber

Deepgram Flux only: end-of-turn confidence required to close a turn. Deepgram default 0.7.

eot_timeout_msinteger

Deepgram Flux only: milliseconds of silence after which a turn is closed regardless of confidence. Deepgram default 5000.

language_hintsstring[]

Deepgram Flux only: candidate language codes for the "flux-general-multi" model.

Response

STT started

instance_idstring

Instance identifier

statusstring required

Changes

Changed in 7 of the 67 revisions of this API.3117

    • added the new speechmatics enum value to the request property provider

      request-property-enum-value-added

    • added the new optional request property eager_eot_threshold

      new-optional-request-property

    • added the new optional request property endpointing

      new-optional-request-property

    • added the new optional request property eot_threshold

      new-optional-request-property

    • added the new optional request property eot_timeout_ms

      new-optional-request-property

    • added the new optional request property keyterms

      new-optional-request-property

    • added the new optional request property language_hints

      new-optional-request-property

    • added the new optional request property model

      new-optional-request-property

    • added the new optional request property utterance_end_ms

      new-optional-request-property

    • added the new azure enum value to the request property provider

      request-property-enum-value-added

    • added the new deepgram_flux enum value to the request property provider

      request-property-enum-value-added

    • removed the enum value azure of the request property provider

      request-property-enum-value-removed

    • added the new azure enum value to the request property provider

      request-property-enum-value-added

    • added the new optional request property provider

      new-optional-request-property

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • d09c97c6ca8c13See the full diff
    • removed the request property provider

      request-property-removed

    • the request property language became optional

      request-property-became-optional

    • the request property partial became optional

      request-property-became-optional

    • added the required property leg_id to the response with the 200 status

      response-required-property-added

    This revision also has 40 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 818619c99a1d21See the full diff
    • the request property language became required

      request-property-became-required

    • removed the required property leg_id from the response with the 200 status

      response-required-property-removed

    • the request property partial with a default value became required

      request-property-became-required-with-default

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog