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

AgentV1SettingsobjectRequired
Send settings configuration to Deepgram's Voice Agent API
OR
AgentV1UpdateSpeakobjectRequired
Send update speak to Deepgram's Voice Agent API
OR
AgentV1InjectUserMessageobjectRequired
Send inject user message to Deepgram's Voice Agent API
OR
AgentV1InjectAgentMessageobjectRequired
Send inject agent message to Deepgram's Voice Agent API
OR
AgentV1SendFunctionCallResponseobjectRequired

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
AgentV1KeepAliveobjectRequired
Send keep alive to Deepgram's Voice Agent API
OR
AgentV1UpdatePromptobjectRequired
Send a prompt update to Deepgram's Voice Agent API
OR
AgentV1MediastringRequiredformat: "binary"
Send raw binary audio data to Deepgram's Voice Agent API for processing

Receive

AgentV1ReceiveFunctionCallResponseobjectRequired

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
AgentV1PromptUpdatedobjectRequired
Receive prompt update from Deepgram's Voice Agent API
OR
AgentV1SpeakUpdatedobjectRequired
Receive speak update from Deepgram's Voice Agent API
OR
AgentV1InjectionRefusedobjectRequired
Receive injection refused message from Deepgram's Voice Agent API
OR
AgentV1WelcomeobjectRequired
Receive welcome message from Deepgram's Voice Agent API
OR
AgentV1SettingsAppliedobjectRequired
Receive settings applied message from Deepgram's Voice Agent API
OR
AgentV1ConversationTextobjectRequired
Receive conversation text from Deepgram's Voice Agent API
OR
AgentV1UserStartedSpeakingobjectRequired
Receive user started speaking message from Deepgram's Voice Agent API
OR
AgentV1AgentThinkingobjectRequired
Receive agent thinking message from Deepgram's Voice Agent API
OR
AgentV1FunctionCallRequestobjectRequired
Receive function call request from Deepgram's Voice Agent API
OR
AgentV1AgentStartedSpeakingobjectRequired
Receive agent started speaking message from Deepgram's Voice Agent API
OR
AgentV1AgentAudioDoneobjectRequired
Receive agent audio done message from Deepgram's Voice Agent API
OR
AgentV1ErrorobjectRequired
Receive error response from Deepgram's Voice Agent API
OR
AgentV1WarningobjectRequired
Receive warning messages from Deepgram's Voice Agent API
OR
AgentV1AudiostringRequiredformat: "binary"
Receive raw binary audio data generated by Deepgram's Voice Agent API