---
title: "Attach a Deepgram Voice Agent to a leg"
method: POST
path: "/legs/{id}/agent/deepgram"
tags: ["Legs"]
---

# Attach a Deepgram Voice Agent to a leg

`POST /legs/{id}/agent/deepgram`

Bridges audio bidirectionally with a Deepgram Voice Agent. Standalone legs use direct audio; legs in a room use mixer taps.

## Request body

- DeepgramAgentRequest
  - `settings` object — Full Deepgram agent settings object (agent.listen, agent.think, agent.speak, etc.). When omitted, sensible defaults are used (nova-3 STT, gpt-4o-mini LLM, aura-2-asteria-en TTS).
  - `greeting` string — Agent greeting message
  - `language` string — Language code (e.g. "en", "es")
  - `api_key` string — API key override (falls back to DEEPGRAM_API_KEY env var)

## Response `200`

Agent started

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

## Other responses

- `400` — Invalid JSON
- `404` — Leg not found
- `409` — Leg not connected, agent already attached, or no audio reader/writer
- `503` — No Deepgram 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/ad30827d3b57/schema)
