---
title: "Start real-time speech-to-text on a leg"
method: POST
path: "/legs/{id}/stt"
tags: ["Legs"]
---

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

`POST /legs/{id}/stt`

## Request body

- STTRequest
  - `language` string, required — Language code (e.g. "en", "es")
  - `partial` boolean, required — Emit partial (non-final) transcripts
  - `provider` 'elevenlabs' | 'deepgram' | 'deepgram_flux' | 'azure' — STT provider: "elevenlabs" (default), "deepgram" (/v1/listen), "deepgram_flux" (/v2/listen, conversational turn detection) or "azure"
  - `api_key` string — API key override (falls back to ELEVENLABS_API_KEY, DEEPGRAM_API_KEY or AZURE_SPEECH_KEY env var depending on provider)
  - `model` string — Provider-specific model. Deepgram: default "nova-3". Deepgram Flux: "flux-general-en" (default) or "flux-general-multi".
  - `keyterms` string[] — Terms to boost recognition of (Deepgram and Deepgram Flux).
  - `endpointing` integer — Deepgram only: milliseconds of silence before a segment is finalized. 0 disables endpointing.
  - `utterance_end_ms` integer — Deepgram only: 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.
  - `eager_eot_threshold` number — 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_threshold` number — Deepgram Flux only: end-of-turn confidence required to close a turn. Deepgram default 0.7.
  - `eot_timeout_ms` integer — Deepgram Flux only: milliseconds of silence after which a turn is closed regardless of confidence. Deepgram default 5000.
  - `language_hints` string[] — Deepgram Flux only: candidate language codes for the "flux-general-multi" model.

## Response `200`

STT started

- StatusResponse
  - `instance_id` string — Instance identifier
  - `status` string, required

## Other responses

- `404` — Leg not found
- `409` — Leg not connected, STT already running, or no audio reader
- `503` — No ElevenLabs API key provided

---

[API](https://skmtc.net/voiceblender/apis/voiceblender-api.md) · [All operations](https://skmtc.net/voiceblender/apis/voiceblender-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voiceblender/voiceblender-api/revisions/c951ca5dcd08/schema)
