Build a Voice Agent

Build a conversational voice agent using Deepgram's Voice Agent WebSocket

HandshakeTry it

WSS
/v1/agent/converse

Headers

AuthorizationstringRequired

Use your API key for authentication, or alternatively generate a temporary token and pass it via the token query parameter.

Example: token %DEEPGRAM_API_KEY% or bearer %DEEPGRAM_TOKEN%

Send

AgentV1SettingsanyRequired
Send settings configuration to Deepgram's Voice Agent API
OR
AgentV1UpdateSpeakanyRequired
Send update speak to Deepgram's Voice Agent API
OR
AgentV1InjectUserMessageanyRequired
Send inject user message to Deepgram's Voice Agent API
OR
AgentV1InjectAgentMessageanyRequired
Send inject agent message to Deepgram's Voice Agent API
OR
AgentV1SendFunctionCallResponseanyRequired

Send a function call response from the client to the server after executing a client-side function call. This is used when the server requests execution of a function marked with client_side: true.

OR
AgentV1KeepAliveanyRequired
Send keep alive to Deepgram's Voice Agent API
OR
AgentV1UpdatePromptanyRequired
Send a prompt update to Deepgram's Voice Agent API
OR
AgentV1MediaanyRequired
Send raw binary audio data to Deepgram's Voice Agent API for processing

Receive

AgentV1ReceiveFunctionCallResponseanyRequired

Receive a function call response from the server after the server has executed a server-side function call internally. This occurs when functions are marked with client_side: false.

OR
AgentV1PromptUpdatedanyRequired
Receive prompt update from Deepgram's Voice Agent API
OR
AgentV1SpeakUpdatedanyRequired
Receive speak update from Deepgram's Voice Agent API
OR
AgentV1InjectionRefusedanyRequired
Receive injection refused message from Deepgram's Voice Agent API
OR
AgentV1WelcomeanyRequired
Receive welcome message from Deepgram's Voice Agent API
OR
AgentV1SettingsAppliedanyRequired
Receive settings applied message from Deepgram's Voice Agent API
OR
AgentV1ConversationTextanyRequired
Receive conversation text from Deepgram's Voice Agent API
OR
AgentV1UserStartedSpeakinganyRequired
Receive user started speaking message from Deepgram's Voice Agent API
OR
AgentV1AgentThinkinganyRequired
Receive agent thinking message from Deepgram's Voice Agent API
OR
AgentV1FunctionCallRequestanyRequired
Receive function call request from Deepgram's Voice Agent API
OR
AgentV1AgentStartedSpeakinganyRequired
Receive agent started speaking message from Deepgram's Voice Agent API
OR
AgentV1AgentAudioDoneanyRequired
Receive agent audio done message from Deepgram's Voice Agent API
OR
AgentV1ErroranyRequired
Receive error response from Deepgram's Voice Agent API
OR
AgentV1WarninganyRequired
Receive warning messages from Deepgram's Voice Agent API
OR
AgentV1AudioanyRequired
Receive raw binary audio data generated by Deepgram's Voice Agent API