> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# エージェントウィジェット設定を取得

GET https://api.elevenlabs.io/v1/convai/agents/{agent_id}/widget

エージェントのウィジェット設定を取得

Reference: https://elevenlabs.io/docs/api-reference/widget/get

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `agent_id` (string, required) — エージェントのID。エージェント作成時に返されます。

### Query parameters

- `conversation_signature` (string, optional, nullable) — WebSocket会話を開始できる、有効期限付きトークンです。エージェント用のトークンは、/v1/convai/conversation/get_signed_urlエンドポイントで生成できます。

## Response

### 200

成功レスポンス。

- `agent_id` (string, required)
- `widget_config` (WidgetConfigResponseModel, required)

## Errors

### 422 Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### WidgetConfigResponseModel

- `language` (string, required)
- `variant` (enum, optional, default: full) — ウィジェットのバリアント
  - Allowed values: `tiny`, `compact`, `full`, `expandable`
- `placement` (enum, optional, default: bottom-right) — 画面上のウィジェットの配置
  - Allowed values: `top-left`, `top`, `top-right`, `bottom-left`, `bottom`, `bottom-right`
- `expandable` (enum, optional, default: never) — ウィジェットを展開できるかどうか
  - Allowed values: `never`, `mobile`, `desktop`, `always`
- `avatar` (WidgetConfigResponseModelAvatar, optional) — ウィジェットのアバター
- `feedback_mode` (enum, optional, default: none) — ウィジェットのフィードバックモード
  - Allowed values: `none`, `during`, `end`
- `end_feedback` (WidgetEndFeedbackConfig, optional, nullable) — 会話終了時に収集するフィードバックの設定
- `bg_color` (string, optional, default: #ffffff) — ウィジェットの背景色
- `text_color` (string, optional, default: #000000) — ウィジェットのテキストカラー
- `btn_color` (string, optional, default: #000000) — ウィジェットのボタン色
- `btn_text_color` (string, optional, default: #ffffff) — ウィジェットのボタンテキスト色
- `border_color` (string, optional, default: #e1e1e1) — ウィジェットの境界線の色
- `focus_color` (string, optional, default: #000000) — ウィジェットのフォーカス時の色
- `border_radius` (integer, optional, nullable) — ウィジェットの角丸半径
- `btn_radius` (integer, optional, nullable) — ウィジェットのボタンの角丸半径
- `action_text` (string, optional, nullable) — ウィジェットのアクションテキスト。
- `start_call_text` (string, optional, nullable) — ウィジェットの通話開始テキスト
- `end_call_text` (string, optional, nullable) — ウィジェットの通話終了テキスト
- `expand_text` (string, optional, nullable) — ウィジェットの展開テキスト
- `listening_text` (string, optional, nullable) — エージェントが聞いているときに表示するテキスト
- `speaking_text` (string, optional, nullable) — エージェントが話しているときに表示するテキスト
- `shareable_page_text` (string, optional, nullable) — 共有時に表示するテキスト
- `shareable_page_show_terms` (boolean, optional, default: true) — 共有可能なページに利用規約を表示するかどうか
- `terms_text` (string, optional, nullable) — 利用規約として表示するテキスト
- `terms_html` (string, optional, nullable) — 利用規約として表示するHTML
- `terms_key` (string, optional, nullable) — 利用規約の表示に使用するキー。
- `show_avatar_when_collapsed` (boolean, optional, nullable, default: false) — ウィジェットを折りたたんだときにアバターを表示するかどうか
- `disable_banner` (boolean, optional, default: false) — バナーを無効にするかどうか
- `override_link` (string, optional, nullable) — ウィジェットのオーバーライドリンク
- `markdown_link_allowed_hosts` (list of AllowlistItem, optional) — クリック可能なMarkdownリンクで許可するホスト名のリスト。任意のドメインを許可するには\{ hostname: '\*' }を使用します。空の場合、リンクは許可されません。
- `markdown_link_include_www` (boolean, optional, default: true) — 許可されたホストのwww.バリアントを自動的に含めるかどうか
- `markdown_link_allow_http` (boolean, optional, default: true) — Whether to allow http:// in addition to https:// for allowed hosts
- `mic_muting_enabled` (boolean, optional, default: true) — マイクのミュートを有効にするかどうか
- `transcript_enabled` (boolean, optional, default: true) — 会話の進行に合わせてウィジェットに会話の文字起こしを表示するかどうか
- `text_input_enabled` (boolean, optional, default: true) — ユーザーがテキストメッセージを送信できるようにするかどうか
- `conversation_mode_toggle_enabled` (boolean, optional, default: false) — ウィジェットで会話モードの切り替えを有効にするかどうか
- `default_expanded` (boolean, optional, default: false) — ウィジェットをデフォルトで展開するかどうか
- `always_expanded` (boolean, optional, default: false) — ウィジェットを常に展開するかどうか
- `dismissible` (boolean, optional, default: false) — ユーザーがウィジェットを閉じられるかどうか
- `show_agent_status` (boolean, optional, default: false) — ツール使用中にエージェントの作業中／完了／エラーステータスを表示するかどうか
- `show_conversation_id` (boolean, optional, default: true) — 切断後に会話IDを表示するかどうか。
- `strip_audio_tags` (boolean, optional, default: true) — メッセージからオーディオマークアップを削除するかどうか。
- `syntax_highlight_theme` (enum, optional, nullable) — コードブロックのシンタックスハイライト用テーマです。設定しない場合は、ウィジェットによる自動検出がデフォルトになります。
  - Allowed values: `light`, `dark`
- `text_contents` (WidgetTextContents, optional) — ウィジェットのテキスト内容。
- `styles` (WidgetStyles, optional) — ウィジェットのスタイル。
- `show_resize_button` (boolean, optional, default: true) — サイズ変更ボタンを表示するかどうか
- `end_confirmation_enabled` (boolean, optional, default: false) — チャットまたは通話を終了する前に、ユーザーに確認を求めるかどうか
- `supported_language_overrides` (list of string, optional, nullable)
- `language_presets` (map from string to WidgetLanguagePresetResponse, optional) — ウィジェット用の言語プリセット
- `text_only` (boolean, optional, default: false) — エージェントがテキストのみモードを使用するかどうか。
- `supports_text_only` (boolean, optional, default: false) — エージェントをテキストのみモードに切り替えられるかどうか。
- `first_message` (string, optional, nullable)
- `use_rtc` (boolean, optional, nullable) — 会話の接続にWebRTCを使用するかどうか
- `file_input_config` (FileInputConfig, optional) — ウィジェットでのファイルアップロード設定

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### WidgetConfigResponseModelAvatar

ウィジェットのアバター

### WidgetEndFeedbackConfig

- `type` (enum, optional, default: rating) — 会話終了時に収集するフィードバックのタイプ
  - Allowed values: `rating`

### AllowlistItem

- `hostname` (string, required) — 許可されたオリジンのホスト名

### WidgetTextContents

- `main_label` (string, optional, nullable) — コンパクト版とフル版の内部に表示する行動喚起。
- `start_call` (string, optional, nullable) — 通話開始ボタンのテキストとARIAラベル。
- `start_chat` (string, optional, nullable) — チャット開始ボタンのテキストとARIAラベル（テキストのみ）。
- `new_call` (string, optional, nullable) — 新しい通話ボタンのテキストとARIAラベル。発信者が次の通話を開始するために、すでに少なくとも1回の通話を完了している場合に表示されます。
- `end_call` (string, optional, nullable) — 通話終了ボタンのテキストとARIAラベル。
- `mute_microphone` (string, optional, nullable) — マイクをミュートするボタンのARIAラベル。
- `change_language` (string, optional, nullable) — 言語変更ドロップダウンのARIAラベル。
- `collapse` (string, optional, nullable) — 折りたたみボタンのARIAラベル。
- `expand` (string, optional, nullable) — 展開ボタンのARIAラベル。
- `copied` (string, optional, nullable) — ユーザーがコピーボタンで値をコピーしたときに表示するテキスト。
- `accept_terms` (string, optional, nullable) — 利用規約に同意するボタンのテキストとARIAラベル。
- `dismiss_terms` (string, optional, nullable) — 利用規約のキャンセルボタンのテキストとARIAラベル。
- `listening_status` (string, optional, nullable) — エージェントが聞き取り中に表示するステータス。
- `speaking_status` (string, optional, nullable) — エージェントが話しているときに表示するステータス。
- `connecting_status` (string, optional, nullable) — エージェントが接続中に表示するステータス。
- `chatting_status` (string, optional, nullable) — エージェントがチャット中に表示するステータス（テキストのみ）。
- `queue_waiting_status` (string, optional, nullable) — 利用可能なエージェントをキューで待機中に表示するステータス。
- `queue_waiting_status_short` (string, optional, nullable) — 利用可能なエージェントを待機中に表示する短いステータス。
- `input_label` (string, optional, nullable) — テキストメッセージ入力欄のARIAラベル。
- `input_placeholder` (string, optional, nullable) — テキストメッセージ入力欄のプレースホルダーテキスト。
- `input_placeholder_text_only` (string, optional, nullable) — テキストメッセージ入力欄のプレースホルダーテキスト（テキストのみ）
- `input_placeholder_new_conversation` (string, optional, nullable) — 新しい会話を開始する際のテキストメッセージ入力欄のプレースホルダーテキスト（テキストのみ）
- `user_ended_conversation` (string, optional, nullable) — ユーザーが会話を終了したときに表示される案内メッセージです。
- `agent_ended_conversation` (string, optional, nullable) — エージェントが会話を終了したときに表示される案内メッセージです。
- `conversation_id` (string, optional, nullable) — 会話IDの横に使用するテキストラベル。
- `error_occurred` (string, optional, nullable) — エラー発生時に使用するテキストラベル。
- `queue_timed_out` (string, optional, nullable) — キューの待機がタイムアウトした場合に表示するエラーメッセージ。
- `copy_id` (string, optional, nullable) — IDコピーボタンに使用するテキストとARIAラベル。
- `initiate_feedback` (string, optional, nullable) — ユーザーにフィードバックを促すために表示するテキスト。
- `request_follow_up_feedback` (string, optional, nullable) — 追加のフィードバック詳細を求めるために表示するテキスト。
- `thanks_for_feedback` (string, optional, nullable) — フィードバックを提供したユーザーに感謝を伝えるために表示するテキスト。
- `thanks_for_feedback_details` (string, optional, nullable) — ユーザーフィードバックの価値を説明するために表示される追加テキスト。
- `follow_up_feedback_placeholder` (string, optional, nullable) — フォローアップフィードバック入力欄のプレースホルダーテキスト。
- `submit` (string, optional, nullable) — 送信ボタンのテキストとARIAラベル。
- `go_back` (string, optional, nullable) — 戻るボタンのテキストとARIAラベル。
- `send_message` (string, optional, nullable) — メッセージ送信ボタンのテキストとARIAラベル。
- `text_mode` (string, optional, nullable) — テキストモード切り替えボタンのテキストとARIAラベル。
- `voice_mode` (string, optional, nullable) — 音声モード切り替えボタンのテキストとARIAラベル。
- `switched_to_text_mode` (string, optional, nullable) — テキストモードに切り替えた際に表示されるトースト通知。
- `switched_to_voice_mode` (string, optional, nullable) — 音声モードに切り替えた際に表示されるトースト通知。
- `copy` (string, optional, nullable) — コピーボタンのテキストとARIAラベル。
- `download` (string, optional, nullable) — ダウンロードボタンのテキストとARIAラベル。
- `wrap` (string, optional, nullable) — 折り返し切り替えボタンのテキストとARIAラベル。
- `agent_working` (string, optional, nullable) — エージェントがツール呼び出しを処理中に表示するステータステキスト。
- `agent_done` (string, optional, nullable) — エージェントがツール呼び出しの処理を完了したときに表示するステータステキスト。
- `agent_error` (string, optional, nullable) — エージェントがツール呼び出し中にエラーに遭遇したときに表示するステータステキスト。
- `attach_file` (string, optional, nullable) — ファイル添付ボタンのテキストとARIAラベル。
- `remove_file` (string, optional, nullable) — ファイル削除ボタンのARIAラベル。
- `file_upload_error` (string, optional, nullable) — ファイルのアップロードに失敗した場合に表示するエラーメッセージです。
- `file_type_unsupported` (string, optional, nullable) — サポートされていないファイルタイプが選択された場合に表示するエラーメッセージです。後ろに受け付け可能なタイプの一覧が続きます。
- `file_too_large` (string, optional, nullable) — ファイルが最大サイズ制限を超えた場合に表示するエラーメッセージです。
- `file_limit_reached` (string, optional, nullable) — 会話で許可されるファイル数の上限に達した場合に表示するエラーメッセージです。
- `typing_indicator` (string, optional, nullable) — エージェントが入力中に表示するステータステキスト。
- `rich_content_unavailable` (string, optional, nullable) — リッチコンテンツをレンダリングできない場合に表示するフォールバックメッセージ。

### WidgetStyles

- `base` (string, optional, nullable) — ベース背景色。
- `base_hover` (string, optional, nullable) — ホバー時のベース背景色。
- `base_active` (string, optional, nullable) — アクティブ時（クリック時）のベース背景色。
- `base_border` (string, optional, nullable) — ベース背景上の境界線の色。
- `base_subtle` (string, optional, nullable) — ベース背景上の補助テキストの色。
- `base_primary` (string, optional, nullable) — ベース背景上の主要テキストの色。
- `base_error` (string, optional, nullable) — ベース背景上のエラーテキストの色。
- `accent` (string, optional, nullable) — アクセントの背景色。
- `accent_hover` (string, optional, nullable) — ホバー時のアクセント背景色。
- `accent_active` (string, optional, nullable) — アクティブ時（クリック時）のアクセント背景色。
- `accent_border` (string, optional, nullable) — アクセント背景上の境界線の色。
- `accent_subtle` (string, optional, nullable) — アクセント背景上の補助テキストの色。
- `accent_primary` (string, optional, nullable) — アクセント背景上の主要テキストの色。
- `overlay_padding` (double, optional, nullable) — ビューポートの端の周囲にあるパディング。
- `button_radius` (double, optional, nullable) — ボタンの角丸半径。
- `input_radius` (double, optional, nullable) — 入力フィールドの角丸半径。
- `bubble_radius` (double, optional, nullable) — チャットバブルの角丸半径。
- `sheet_radius` (double, optional, nullable) — シートのデフォルトの角丸半径。
- `compact_sheet_radius` (double, optional, nullable) — コンパクトモードのシートの角丸半径。
- `dropdown_sheet_radius` (double, optional, nullable) — ドロップダウンシートの角丸半径。

### WidgetLanguagePresetResponse

- `first_message` (string, optional, nullable)
- `text_contents` (WidgetTextContents, optional, nullable) — 選択した言語のテキスト内容
- `terms_text` (string, optional, nullable) — この言語で利用規約として表示するテキスト
- `terms_html` (string, optional, nullable) — この言語の利用規約として表示するHTML
- `terms_key` (string, optional, nullable) — この言語で利用規約を表示するためのキー。

### FileInputConfig

- `enabled` (boolean, optional, default: true) — 有効にすると、LLMがマルチモーダル入力をサポートしている場合、ユーザーはチャットで画像、PDF、またはテキストファイルを添付できます。
- `max_files_in_memory` (integer, optional, default: 10) — 会話中にメモリに保持する最新ファイル数です。古いファイルは要約され、そのバイトデータは解放されます。
- `max_files_per_conversation` (integer, optional, default: 10) — 1回の会話でユーザーがアップロードできるファイルの合計数。アップロードはファイルごとに課金されます。無制限の場合は-1、またはmax_files_in_memory以上の値を使用します。

### ValidationErrorLocItems

### OrbAvatar

- `type` ("orb", optional, default: orb) — アバターのタイプ
- `color_1` (string, optional, default: #2792dc) — アバターの1番目の色
- `color_2` (string, optional, default: #9ce6e6) — アバターの2番目の色

### URLAvatar

- `type` ("url", optional, default: url) — アバターのタイプ
- `custom_url` (string, optional, default: ) — アバターのカスタムURL

### ImageAvatar

- `type` ("image", optional, default: image) — アバターのタイプ
- `url` (string, optional, default: ) — アバターのURL

## Examples

**Response**

```json
{
  "agent_id": "string",
  "widget_config": {
    "language": "en",
    "supported_language_overrides": [
      "es",
      "fr"
    ],
    "language_presets": {},
    "text_only": false,
    "supports_text_only": true,
    "first_message": "Hello! How can I help you today?",
    "use_rtc": false,
    "file_input_config": {
      "enabled": false,
      "max_files_in_memory": 10,
      "max_files_per_conversation": 10
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/widget")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```