GET
/v1/convai/agents/{agent_id}/widget
ElevenLabs APIGet Agent Widget Config
- Base URL
- https://api.elevenlabs.io
- Auth
- xi-api-key: <ELEVENLABS_API_KEY>
- Last verified
- 2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 201 tokens · Vary: Accept
→ 201 tokens · Vary: Accept
Critical gotchas
Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.
Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.
cURL
curl -X GET 'https://api.elevenlabs.io/v1/convai/agents/agent-id/widget?conversation_signature=example-conversation-signature' \ -H "xi-api-key: $ELEVENLABS_API_KEY"Get a free ElevenLabs API key → sponsored
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| agent_id | path | string | Yes | The id of an agent. This is returned on agent creation. |
| conversation_signature | query | string | No | An expiring token that enables a websocket conversation to start. These can be generated for an agent using the /v1/convai/conversation/get_signed_url endpoint |
Response 200 OK
{
"agent_id": "string",
"widget_config": {
"file_input_config": {
"enabled": false,
"max_files_in_memory": 10,
"max_files_per_conversation": 10
},
"first_message": "Hello! How can I help you today?",
"language": "en",
"language_presets": {},
"supported_language_overrides": [
"es",
"fr"
],
"supports_text_only": true,
"text_only": false,
"use_rtc": false
}
}