For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Use Authorization: Token <API_KEY>
Example: Authorization: Token 12345abcdef
OR
AuthorizationBearer
Use `Authorization: Bearer <JWT>`
Example: `Authorization: Bearer eyJhbGciOiJ...`
Headers
AuthorizationstringRequired
Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead.
**Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%`
Query parameters
encodingenumOptionalDefaults to linear16
Encoding allows you to specify the expected encoding of your audio output for streaming TTS. Only streaming-compatible encodings are supported.
Allowed values:
mip_opt_outanyOptionalDefaults to false
Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
modelenumOptionalDefaults to aura-asteria-en
AI model used to process submitted text
sample_rateenumOptionalDefaults to 24000
Sample Rate specifies the sample rate for the output audio. Based on encoding 8000 or 24000 are possible defaults. For some encodings sample rate is not configurable.
Allowed values:
speeddoubleOptional0.7-1.5Defaults to 1
Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages.
Send
SpeakV1TextobjectRequired
Text to convert to audio
OR
SpeakV1FlushobjectRequired
Flush the buffer and receive the final audio for text sent so far
OR
SpeakV1ClearobjectRequired
Clear the buffer and start a new audio generation. Potentially destructive operation for any text in the buffer
OR
SpeakV1CloseobjectRequired
Flush the buffer and close the connection gracefully after all audio is generated
Receive
SpeakV1AudiostringRequiredformat: "binary"
Receive audio chunks as they are generated
OR
SpeakV1MetadataobjectRequired
Receive metadata about the audio generation
OR
SpeakV1FlushedobjectRequired
Receive metadata about the audio generation
OR
SpeakV1ClearedobjectRequired
Receive metadata about the audio generation
OR
SpeakV1WarningobjectRequired
Receive a warning about the audio generation
Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead.
**Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%`