curl --request POST \
--url https://guidinghand.ai/v1/agents/{agent_id}/listen \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyterms": [
"<string>"
],
"language": "zh",
"also": [
"en"
],
"silence_seconds": 0.7,
"model": "scribe_v3_live",
"multilingual": false,
"turns": "pause",
"speakers": false,
"conversation_id": "conv_8f2k1m0q"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyterms: ['<string>'],
language: 'zh',
also: ['en'],
silence_seconds: 0.7,
model: 'scribe_v3_live',
multilingual: false,
turns: 'pause',
speakers: false,
conversation_id: 'conv_8f2k1m0q'
})
};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/listen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/listen"
payload = {
"keyterms": ["<string>"],
"language": "zh",
"also": ["en"],
"silence_seconds": 0.7,
"model": "scribe_v3_live",
"multilingual": False,
"turns": "pause",
"speakers": False,
"conversation_id": "conv_8f2k1m0q"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "listening",
"url": "<string>",
"expires_in": 900,
"model": "scribe_v3_live",
"audio_format": "pcm_16000",
"keyterms": [
"<string>"
]
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Listen to a microphone for an agent
Where a browser sends a microphone so the agent’s page can show and use what is said: a WebSocket address on this API’s host, good for 15 minutes, which carries the audio on to ElevenLabs (Scribe, realtime), so no key of yours or ours reaches the browser and the page only talks to Eager. Send 16 kHz mono PCM as {"message_type":"input_audio_chunk","audio_base_64":"…","sample_rate":16000}; it sends partial_transcript (text, as it is being said) and committed_transcript (text, once a pause ends the sentence). What you do with the text is yours: send it to the agent as input. With conversation_id, the conversation becomes a web call and each listening socket is on its voice trace: when it opened and closed, and how long it was open. A conversation’s id comes with the first reply (POST /v1/agents//responses), so send a first message before you ask to listen; listening asked for without an id is not on any trace. When a socket closes (ElevenLabs ends a long session), ask for a new address with the same conversation_id. Not charged for now.
curl --request POST \
--url https://guidinghand.ai/v1/agents/{agent_id}/listen \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyterms": [
"<string>"
],
"language": "zh",
"also": [
"en"
],
"silence_seconds": 0.7,
"model": "scribe_v3_live",
"multilingual": false,
"turns": "pause",
"speakers": false,
"conversation_id": "conv_8f2k1m0q"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyterms: ['<string>'],
language: 'zh',
also: ['en'],
silence_seconds: 0.7,
model: 'scribe_v3_live',
multilingual: false,
turns: 'pause',
speakers: false,
conversation_id: 'conv_8f2k1m0q'
})
};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/listen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/listen"
payload = {
"keyterms": ["<string>"],
"language": "zh",
"also": ["en"],
"silence_seconds": 0.7,
"model": "scribe_v3_live",
"multilingual": False,
"turns": "pause",
"speakers": False,
"conversation_id": "conv_8f2k1m0q"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "listening",
"url": "<string>",
"expires_in": 900,
"model": "scribe_v3_live",
"audio_format": "pcm_16000",
"keyterms": [
"<string>"
]
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
Body
The conversation this is heard in: one with this same agent (another agent’s is a 400, an unknown one a 404). It makes the conversation a web call (its call), unless it is a phone call, a scheduled run, a website widget’s chat or an eval’s conversation already: those stay what they are. Either way each listening socket is written on the conversation’s voice trace (GET /v1/conversations/{conversation_id}/voice) as counts and timings, and its audio is kept with the conversation (GET /v1/conversations/{conversation_id}/audio) unless the agent’s recording is off (GET /v1/agents/{agent_id}/recording). Left out, nothing is kept.
"conv_8f2k1m0q"