Single Text Request

Convert text into natural-sounding speech using Deepgram’s TTS REST API

Headers

AuthorizationstringRequired

Header authentication of the form Token <token>

Query parameters

bit_rateintegerOptional
The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
callbackstringOptional
URL to which we'll make the callback request
callback_methodenumOptionalDefaults to POST
HTTP method by which the callback request will be made
Allowed values:
mip_opt_outbooleanOptionalDefaults 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

containerenumOptionalDefaults to wav
Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.
Allowed values:
encodingenumOptionalDefaults to mp3
Encoding allows you to specify the expected encoding of your audio output
modelenumOptionalDefaults to aura-asteria-en
AI model used to process submitted text
sample_rateintegerOptional
Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable

Request

This endpoint expects an object.
textstringRequired
The text content to be converted to speech

Response

Successful text to speech

Errors