GET
/
v1
/
convai
/
agents
/
{agent_id}
/
widget
from elevenlabs import ElevenLabs

client = ElevenLabs(
    api_key="YOUR_API_KEY",
)
client.conversational_ai.get_agent_widget(
    agent_id="21m00Tcm4TlvDq8ikWAM",
)
{
  "agent_id": "<string>",
  "widget_config": {
    "variant": "compact",
    "avatar": {
      "type": "orb",
      "color_1": "#2792dc",
      "color_2": "#9ce6e6"
    },
    "feedback_mode": "none",
    "custom_avatar_path": "<string>",
    "bg_color": "#ffffff",
    "text_color": "#000000",
    "btn_color": "#000000",
    "btn_text_color": "#ffffff",
    "border_color": "#e1e1e1",
    "focus_color": "#000000",
    "border_radius": 123,
    "btn_radius": 123,
    "action_text": "<string>",
    "start_call_text": "<string>",
    "end_call_text": "<string>",
    "expand_text": "<string>",
    "listening_text": "<string>",
    "speaking_text": "<string>",
    "shareable_page_text": "<string>"
  }
}

Headers

xi-api-key
string

Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.

Path Parameters

agent_id
string
required

The id of an agent. This is returned on agent creation.

Query Parameters

conversation_signature
string

An expiring token that enables a conversation to start. These can be generated for an agent using the /v1/convai/conversation/get_signed_url endpoint

Response

200
application/json

Successful Response

The response is of type object.