> 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.

# 会話をシミュレート

POST https://api.elevenlabs.io/v1/convai/agents/{agent_id}/simulate-conversation
Content-Type: application/json

非推奨です。このエンドポイントは2026年10月31日に削除されます。シミュレーションの作成と実行には、`/v1/convai/agent-testing/create` および `/v1/convai/agents/:agent_id/run-tests` エンドポイントを使用してください。エージェントとシミュレートされたユーザーの会話を実行します。

Reference: https://elevenlabs.io/docs/eleven-agents/api-reference/agents/simulate-conversation

## 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。エージェント作成時に返されます。

### Body (application/json)

This endpoint expects an object.

- `simulation_specification` (ConversationSimulationSpecification, required) — 会話のシミュレーション方法を詳述した仕様
- `extra_evaluation_criteria` (list of PromptEvaluationCriteria, optional) — テストする評価基準のリストです。
- `new_turns_limit` (integer, optional, default: 100) — 会話シミュレーションで生成する新しいターンの最大数

## Response

### 200

成功レスポンス。

- `simulated_conversation` (list of ConversationHistoryTranscriptResponseModel, required)
- `analysis` (ConversationHistoryAnalysisCommonModel, required)

## Errors

### 422 Agents Simulate Conversation Request Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### ConversationSimulationSpecification

エージェントとAIユーザー間の会話をシミュレーションするために使用する仕様。

- `simulated_user_config` (AgentConfig, required)
- `tool_mock_config` (map from string to ToolMockConfig, optional)
- `partial_conversation_history` (list of ConversationHistoryTranscriptCommonModelInput, optional) — シミュレーション開始時に使用する会話履歴の一部です。空の場合、シミュレーションは新規に開始されます。
- `dynamic_variables` (map from string to any, optional)

### PromptEvaluationCriteria

トランスクリプトと、達成したかどうかをYes／Noで回答するプロンプトを使用した評価

- `id` (string, required) — 評価基準の一意の識別子
- `name` (string, required)
- `conversation_goal_prompt` (string, required) — エージェントが会話の評価に使用するプロンプト
- `type` ("prompt", optional) — 評価基準のタイプ
- `use_knowledge_base` (boolean, optional, default: false) — プロンプトを評価する際に、エージェントのナレッジベースを使用するかどうか。
- `scope` (enum, optional, default: conversation) — この基準の評価時に使用する文字起こしコンテキストの範囲。「conversation」は文字起こし全体を使用し、「agent」は定義元エージェントがアクティブだった部分のみを使用します。
  - Allowed values: `conversation`, `agent`
- `llm` (enum, optional) — この評価基準に使用するLLMモデル。設定されていない場合は、エージェントのanalysis_llmのデフォルトを使用します。
  - Allowed values: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4-turbo`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.2-chat-latest`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, `gpt-5-mini`, `gpt-5-nano`, `gpt-3.5-turbo`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemini-4-argon`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-sonnet-4`, `claude-haiku-4-5`, `claude-haiku-5-5`, `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-5-sonnet-v1`, `claude-3-haiku`, `grok-beta`, `custom-llm`, `qwen3-4b`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `qwen35-397b-a17b`, `gpt-oss-20b`, `gpt-oss-120b`, `glm-45-air-fp8`, `glm-52`, `deepseek-v41-flash`, `nemotron-35-super-vl-nvfp4`, `gemini-2.5-flash-preview-09-2025`, `gemini-2.5-flash-lite-preview-09-2025`, `gemini-2.5-flash-preview-05-20`, `gemini-2.5-flash-preview-04-17`, `gemini-2.5-flash-lite-preview-06-17`, `gemini-2.0-flash-lite-001`, `gemini-2.0-flash-001`, `gemini-1.5-flash-002`, `gemini-1.5-flash-001`, `gemini-1.5-pro-002`, `gemini-1.5-pro-001`, `claude-sonnet-4@20250514`, `claude-sonnet-4-5@20250929`, `claude-haiku-4-5@20251001`, `claude-3-7-sonnet@20250219`, `claude-3-5-sonnet@20240620`, `claude-3-5-sonnet-v2@20241022`, `claude-3-haiku@20240307`, `gpt-5-2025-08-07`, `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.4-2026-03-05`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano-2026-03-17`, `gpt-5.5-2026-04-23`, `gpt-5-mini-2025-08-07`, `gpt-5-nano-2025-08-07`, `gpt-4.1-2025-04-14`, `gpt-4.1-mini-2025-04-14`, `gpt-4.1-nano-2025-04-14`, `gpt-4o-mini-2024-07-18`, `gpt-4o-2024-11-20`, `gpt-4o-2024-08-06`, `gpt-4o-2024-05-13`, `gpt-4-0613`, `gpt-4-0314`, `gpt-4-turbo-2024-04-09`, `gpt-3.5-turbo-0125`, `gpt-3.5-turbo-1106`, `watt-tool-8b`, `watt-tool-70b`
- `scoring_mode` (enum, optional, default: binary) — この基準のスコアリング方法です。'binary'は成功／失敗／不明に判定されます。'numeric_uniform'は[0, max_score]スケールの数値を返し、総合会話成功率に正規化されます。
  - Allowed values: `binary`, `numeric_uniform`
- `max_score` (integer, optional, default: 100) — 数値スコアスケールの最大値（最小値は常に0）。scoring_modeが'numeric_uniform'の場合にのみ使用されます。
- `score_instructions` (string, optional) — 数値スケールへの値の割り当て方法を説明する任意の自由記述指示です。scoring_modeが'numeric_uniform'の場合にのみ使用されます。

### ConversationHistoryTranscriptResponseModel

- `role` (enum, required)
  - Allowed values: `user`, `agent`
- `time_in_call_secs` (integer, required)
- `agent_metadata` (AgentMetadata, optional)
- `message` (string, optional)
- `multivoice_message` (ConversationHistoryMultivoiceMessageModel, optional) — マルチボイスエージェントからのメッセージを表します。
- `tool_calls` (list of ConversationHistoryTranscriptToolCallCommonModelOutput, optional)
- `tool_results` (list of ConversationHistoryTranscriptResponseModelToolResultsItem, optional)
- `feedback` (UserFeedback, optional)
- `llm_override` (string, optional)
- `producing_llm` (string, optional)
- `conversation_turn_metrics` (ConversationTurnMetrics, optional)
- `rag_retrieval_info` (RagRetrievalInfo, optional)
- `llm_usage` (LlmUsageOutput, optional)
- `interrupted` (boolean, optional, default: false)
- `ignored_as_backchannel` (boolean, optional, default: false)
- `platform_event` (enum, optional)
  - Allowed values: `user_turn_timeout`, `skip_turn_wait_elapsed`
- `original_message` (string, optional)
- `reasoning` (list of ConversationReasoningModel, optional)
- `source_medium` (enum, optional)
  - Allowed values: `audio`, `dtmf`, `text`, `image`, `file`
- `source_event_id` (integer, optional)
- `used_static_kb_document_ids` (list of string, optional)
- `user_identifier` (string, optional)
- `id` (string, optional)
- `triggered_guardrails` (list of TriggeredGuardrailCommonModel, optional)
- `file_input` (ConversationHistoryTranscriptFileInputResponseModel, optional) — 非推奨：このターンの最初の添付ファイルです。すべての添付ファイルを確認するには`file_inputs`を使用してください。
- `file_inputs` (list of ConversationHistoryTranscriptFileInputResponseModel, optional) — このターンに添付されたすべてのファイル。ユーザーが添付した順序で並びます。
- `contextual_update_info` (ContextualUpdateInfo, optional)
- `reasoned` (boolean, optional, default: false)

### ConversationHistoryAnalysisCommonModel

- `call_successful` (enum, required)
  - Allowed values: `success`, `failure`, `unknown`
- `transcript_summary` (string, required)
- `evaluation_criteria_results` (map from string to ConversationHistoryEvaluationCriteriaResultCommonModel, optional)
- `data_collection_results` (map from string to DataCollectionResultCommonModel, optional)
- `evaluation_criteria_results_list` (list of ConversationHistoryEvaluationCriteriaResultCommonModel, optional)
- `data_collection_results_list` (list of DataCollectionResultCommonModel, optional)
- `call_success_score` (double, optional)
- `call_summary_title` (string, optional)
- `scoped` (list of ScopedAnalysisResult, optional)

### ValidationError

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

### AgentConfig

- `first_message` (string, optional, default: ) — 空でない場合、エージェントが最初に発するメッセージです。空の場合、エージェントはユーザーが会話を開始するのを待ちます。
- `language` (string, optional, default: en) — エージェントの言語（ASRおよびTTSで使用）
- `hinglish_mode` (boolean, optional, default: false) — 有効にすると、エージェントはヒンディー語、マラヤーラム語、テルグ語、カンナダ語での応答に英単語や英語のフレーズを混在させます。
- `dynamic_variables` (any, optional)
- `disable_first_message_interruptions` (boolean, optional, default: false) — trueの場合、最初のメッセージの配信中はユーザーがエージェントを中断できません。
- `max_conversation_duration_message` (string, optional, default: ) — 空でない場合、会話の最大時間に達したときにエージェントが送信するメッセージです。
- `text_behavior_overrides` (map from string to BehaviorOverride, optional) — テキスト会話におけるチャネルごとの応答動作オーバーライド。未設定の場合、組み込みチャネルのデフォルトが適用されます。
- `prompt` (PromptAgentApiModelOutput, optional) — エージェント用のプロンプト

### ToolMockConfig

- `default_return_value` (string, optional, default: Tool Called.)
- `default_is_error` (boolean, optional, default: false)

### ConversationHistoryTranscriptCommonModelInput

- `role` (enum, required)
  - Allowed values: `user`, `agent`
- `time_in_call_secs` (integer, required)
- `agent_metadata` (AgentMetadata, optional)
- `message` (string, optional)
- `multivoice_message` (ConversationHistoryMultivoiceMessageModel, optional) — マルチボイスエージェントからのメッセージを表します。
- `tool_calls` (list of ConversationHistoryTranscriptToolCallCommonModelInput, optional)
- `tool_results` (list of ConversationHistoryTranscriptCommonModelInputToolResultsItem, optional)
- `feedback` (UserFeedback, optional)
- `llm_override` (string, optional)
- `producing_llm` (string, optional)
- `conversation_turn_metrics` (ConversationTurnMetrics, optional)
- `rag_retrieval_info` (RagRetrievalInfo, optional)
- `llm_usage` (LlmUsageInput, optional)
- `interrupted` (boolean, optional, default: false)
- `ignored_as_backchannel` (boolean, optional, default: false)
- `platform_event` (enum, optional)
  - Allowed values: `user_turn_timeout`, `skip_turn_wait_elapsed`
- `original_message` (string, optional)
- `reasoning` (list of ConversationReasoningModel, optional)
- `source_medium` (enum, optional)
  - Allowed values: `audio`, `dtmf`, `text`, `image`, `file`
- `source_event_id` (integer, optional)
- `used_static_kb_document_ids` (list of string, optional)
- `user_identifier` (string, optional)
- `id` (string, optional)
- `triggered_guardrails` (list of TriggeredGuardrailCommonModel, optional)

### AgentMetadata

- `agent_id` (string, required)
- `branch_id` (string, optional)
- `workflow_node_id` (string, optional)
- `version_id` (string, optional)

### ConversationHistoryMultivoiceMessageModel

マルチボイスエージェントからのメッセージを表します。

- `parts` (list of ConversationHistoryMultivoiceMessagePartModel, required)

### ConversationHistoryTranscriptToolCallCommonModelOutput

- `request_id` (string, required)
- `tool_name` (string, required)
- `params_as_json` (string, required)
- `tool_has_been_called` (boolean, required)
- `type` (enum, optional)
  - Allowed values: `system`, `webhook`, `client`, `mcp`, `workflow`, `api_integration_webhook`, `api_integration_mcp`, `smb`
- `tool_id` (string, optional) — 呼び出されたツールのIDです。システムツールなど、IDを持たないツールには設定されません。
- `tool_details` (ConversationHistoryTranscriptToolCallCommonModelOutputToolDetails, optional)

### ConversationHistoryTranscriptResponseModelToolResultsItem

### UserFeedback

- `score` (enum, required)
  - Allowed values: `like`, `dislike`
- `time_in_call_secs` (integer, required)

### ConversationTurnMetrics

- `metrics` (map from string to MetricRecord, optional)
- `convai_asr_provider` (string, optional)
- `convai_tts_model` (string, optional)
- `convai_tts_cascade` (string, optional)
- `voice_id` (string, optional)

### RagRetrievalInfo

- `chunks` (list of RagChunkMetadata, required)
- `embedding_model` (enum, required, default: e5_mistral_7b_instruct)
  - Allowed values: `e5_mistral_7b_instruct`, `multilingual_e5_large_instruct`
- `retrieval_query` (string, required)
- `rag_latency_secs` (double, required)
- `used_chunk_ids` (list of string, optional)

### LlmUsageOutput

- `model_usage` (map from string to LlmInputOutputTokensUsage, optional)

### ConversationReasoningModel

- `summary` (string, optional)
- `provider_redact` (boolean, optional, default: false)

### TriggeredGuardrailCommonModel

- `guardrail_type` (enum, required)
  - Allowed values: `custom`, `prompt_injection`, `self_harm_intent`, `violence_graphic`, `sexual`, `violence`, `harassment`, `sexual_minors`, `self_harm`, `self_harm_instructions`, `harassment_threatening`, `hate`, `hate_threatening`, `profanity`, `religion_or_politics`, `medical_and_legal`, `guardrail`
- `guardrail_name` (string, optional)

### ConversationHistoryTranscriptFileInputResponseModel

- `file_id` (string, required)
- `original_filename` (string, required)
- `mime_type` (string, required)
- `file_url` (string, required)

### ContextualUpdateInfo

- `context_id` (string, required) — 関連するコンテキスト更新をグループ化する、クライアント指定の識別子。
- `is_superseded` (boolean, optional, default: false) — このコンテキスト更新が、同じcontext_idを持つより新しい更新に置き換えられた場合はtrueです。

### ConversationHistoryEvaluationCriteriaResultCommonModel

- `criteria_id` (string, required)
- `result` (enum, required)
  - Allowed values: `success`, `failure`, `unknown`
- `rationale` (string, required)
- `scoring_mode` (enum, optional, default: binary)
  - Allowed values: `binary`, `numeric_uniform`
- `score` (integer, optional)
- `max_score` (integer, optional)

### DataCollectionResultCommonModel

- `data_collection_id` (string, required)
- `rationale` (string, required)
- `name` (string, optional)
- `value` (any, optional)
- `json_schema` (LiteralJsonSchemaProperty, optional) — リテラルJSON型のスキーマプロパティです。重要：設定できるのは、description（LLMが値を提供）、dynamic_variable（変数からの値）、is_system_provided（システムが値を提供）、constant_value（固定値）、is_omitted（パラメータを省略）のうち1つだけです。これらは相互排他的です。

### ScopedAnalysisResult

- `scope` (enum, required, default: conversation) — 分析の範囲。「conversation」は文字起こし全体を使用し、「agent」は定義元エージェントがアクティブだった部分のみを使用します。
  - Allowed values: `conversation`, `agent`
- `source_agent_id` (string, required)
- `successful` (enum, required)
  - Allowed values: `success`, `failure`, `unknown`
- `source_branch_id` (string, optional) — このスコープ付きブロックのエージェントブランチです。重複するagent_idを区別します。
- `evaluation_criteria_results` (map from string to ConversationHistoryEvaluationCriteriaResultCommonModel, optional)
- `data_collection_results` (map from string to DataCollectionResultCommonModel, optional)
- `success_score` (double, optional)

### ValidationErrorLocItem

### BehaviorOverride

- `verbosity` (enum, optional) — 詳細度のオーバーライド。未設定の場合は基となるデフォルトが適用されます。
  - Allowed values: `auto`, `concise`, `thorough`
- `output_format` (enum, optional) — 出力形式のオーバーライド。未設定の場合は、基になるデフォルトが適用されます。
  - Allowed values: `mp3_22050_32`, `mp3_44100_32`, `mp3_44100_64`, `mp3_44100_96`, `mp3_44100_128`, `mp3_44100_192`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_44100`, `ulaw_8000`
- `interaction_budget` (enum, optional) — インタラクション予算の上書きです。未設定の場合は基盤となるデフォルトが適用されます。
  - Allowed values: `realtime`, `5_minutes`, `10_minutes`, `1_hour`

### PromptAgentApiModelOutput

- `prompt` (string, optional, default: ) — エージェント用のプロンプト
- `llm` (enum, optional) — プロンプトとチャット履歴を使用してクエリするLLM。データレジデンシーを使用する場合、LLMはデータレジデンシー環境でサポートされている必要があります。
  - Allowed values: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4-turbo`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.2-chat-latest`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, `gpt-5-mini`, `gpt-5-nano`, `gpt-3.5-turbo`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemini-4-argon`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-sonnet-4`, `claude-haiku-4-5`, `claude-haiku-5-5`, `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-5-sonnet-v1`, `claude-3-haiku`, `grok-beta`, `custom-llm`, `qwen3-4b`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `qwen35-397b-a17b`, `gpt-oss-20b`, `gpt-oss-120b`, `glm-45-air-fp8`, `glm-52`, `deepseek-v41-flash`, `nemotron-35-super-vl-nvfp4`, `gemini-2.5-flash-preview-09-2025`, `gemini-2.5-flash-lite-preview-09-2025`, `gemini-2.5-flash-preview-05-20`, `gemini-2.5-flash-preview-04-17`, `gemini-2.5-flash-lite-preview-06-17`, `gemini-2.0-flash-lite-001`, `gemini-2.0-flash-001`, `gemini-1.5-flash-002`, `gemini-1.5-flash-001`, `gemini-1.5-pro-002`, `gemini-1.5-pro-001`, `claude-sonnet-4@20250514`, `claude-sonnet-4-5@20250929`, `claude-haiku-4-5@20251001`, `claude-3-7-sonnet@20250219`, `claude-3-5-sonnet@20240620`, `claude-3-5-sonnet-v2@20241022`, `claude-3-haiku@20240307`, `gpt-5-2025-08-07`, `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.4-2026-03-05`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano-2026-03-17`, `gpt-5.5-2026-04-23`, `gpt-5-mini-2025-08-07`, `gpt-5-nano-2025-08-07`, `gpt-4.1-2025-04-14`, `gpt-4.1-mini-2025-04-14`, `gpt-4.1-nano-2025-04-14`, `gpt-4o-mini-2024-07-18`, `gpt-4o-2024-11-20`, `gpt-4o-2024-08-06`, `gpt-4o-2024-05-13`, `gpt-4-0613`, `gpt-4-0314`, `gpt-4-turbo-2024-04-09`, `gpt-3.5-turbo-0125`, `gpt-3.5-turbo-1106`, `watt-tool-8b`, `watt-tool-70b`
- `reasoning_effort` (enum, optional) — モデルの推論量。一部のモデルでのみ利用できます。
  - Allowed values: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`
- `thinking_budget` (integer, optional) — 思考に使用する最大トークン数。モデルが対応している場合は、0を指定すると無効になります。
- `enable_reasoning_summary` (boolean, optional, default: false) — モデルの推論要約を有効にします。無効にすると、TTFBを高速化するため、可能な場合はプロバイダーに要約をリクエストしません。ZRMには対応していません。
- `temperature` (double, optional) — LLMのtemperature。デフォルトは0です。nullに設定すると、LLMリクエストからこのパラメータを完全に省略します（temperatureフィールドを受け付けないカスタムLLMで有用です）。
- `max_tokens` (integer, optional, default: -1) — 0より大きい場合、LLMが予測できるトークンの最大数
- `tool_ids` (list of string, optional) — エージェントが使用するツールIDのリストです。
- `tool_ids_strict` (boolean, optional, default: false) — 会話のオーバーライドとしてのみ適用され、tool_idsのオーバーライドが許可される場合に使用できます。trueの場合、オーバーライドされたtool_idsは、ワークフローノード上のツールを含む、その会話で許可されるツールの完全な一覧です。エージェントに設定した場合は無視されます。
- `built_in_tools` (BuiltInToolsOutput, optional) — エージェントが使用する組み込みシステムツール
- `enable_parallel_tool_calls` (boolean, optional, default: true) — 並列ツール呼び出しを有効にします。有効にすると、エージェントは1つのターン内で複数のツールを並列実行できます。すべてのモデルでサポートされているわけではありません。
- `mcp_server_ids` (list of string, optional) — エージェントが使用するMCPサーバーIDの一覧
- `native_mcp_server_ids` (list of string, optional) — エージェントが使用するネイティブMCPサーバーIDの一覧
- `knowledge_base` (list of KnowledgeBaseLocator, optional) — エージェントが使用するナレッジベースの一覧
- `custom_llm` (CustomLlm, optional) — LLMフィールドが'CUSTOM_LLM'に設定されている場合のカスタムLLMの定義
- `ignore_default_personality` (boolean, optional) — システムプロンプトからデフォルトの人格に関する行を削除するかどうか
- `rag` (RagConfigOutput, optional) — RAGの設定
- `timezone` (string, optional) — システムプロンプトで現在時刻を表示するためのタイムゾーン。設定すると、このタイムゾーンを使用した現在時刻がシステムプロンプトに含まれます。有効なタイムゾーン名（例：'America/New_York'、'Europe/London'、'UTC'）を指定する必要があります。正確な時刻認識応答のために推奨されます。設定しない場合、動的変数またはツールで現在日時を提供しない限り、エージェントは現在日時を認識できず、不正確な時刻参照やハルシネーションにつながる可能性があります。
- `backup_llm_config` (PromptAgentApiModelOutputBackupLlmConfig, optional) — バックアップLLMカスケードの設定です。無効化するか、システムのデフォルトを使用するか、カスタムの順序を指定できます。
- `cascade_timeout_seconds` (double, optional, default: 4) — バックアップLLMに切り替えるまでの時間（秒）。2～15秒である必要があります。
- `tools` (list of PromptAgentApiModelOutputToolsItem, optional, deprecated) — エージェントが会話中に使用できるツールの一覧です。代わりにtool_idsを使用してください。

### ConversationHistoryTranscriptToolCallCommonModelInput

- `request_id` (string, required)
- `tool_name` (string, required)
- `params_as_json` (string, required)
- `tool_has_been_called` (boolean, required)
- `type` (enum, optional)
  - Allowed values: `system`, `webhook`, `client`, `mcp`, `workflow`, `api_integration_webhook`, `api_integration_mcp`, `smb`
- `tool_id` (string, optional) — 呼び出されたツールのIDです。システムツールなど、IDを持たないツールには設定されません。
- `tool_details` (ConversationHistoryTranscriptToolCallCommonModelInputToolDetails, optional)

### ConversationHistoryTranscriptCommonModelInputToolResultsItem

### LlmUsageInput

- `model_usage` (map from string to LlmInputOutputTokensUsage, optional)

### ConversationHistoryMultivoiceMessagePartModel

マルチボイスメッセージの単一音声パートを表します。

- `text` (string, required)
- `voice_label` (string, optional)
- `time_in_call_secs` (integer, optional)

### ConversationHistoryTranscriptToolCallCommonModelOutputToolDetails

- `type`: `api_integration_webhook`
  - `credential_id` (string, required, default: )
  - `integration_connection_id` (string, required, default: )
  - `integration_id` (string, required, default: )
  - `webhook_details` (ConversationHistoryTranscriptToolCallWebhookDetails, required)
- `type`: `client`
  - `parameters` (string, required)
- `type`: `mcp`
  - `approval_policy` (string, required)
  - `integration_type` (string, required)
  - `mcp_server_id` (string, required)
  - `mcp_server_name` (string, required)
  - `mcp_tool_description` (string, optional, default: )
  - `mcp_tool_name` (string, optional, default: )
  - `parameters` (map from string to string, optional)
  - `requires_approval` (boolean, optional, default: false)
- `type`: `webhook`
  - `method` (string, required)
  - `url` (string, required)
  - `body` (string, optional)
  - `headers` (map from string to string, optional)
  - `path_params` (map from string to string, optional)
  - `query_params` (map from string to string, optional)

### ConversationHistoryTranscriptOtherToolsResultCommonModel

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `type` (enum, optional)
  - Allowed values: `client`, `webhook`, `mcp`, `code`

### ConversationHistoryTranscriptSystemToolResultCommonModelOutput

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("system", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (ConversationHistoryTranscriptSystemToolResultCommonModelOutputResult, optional)

### ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModelOutput

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `is_blocked` (boolean, required, default: false)
- `tool_has_been_called` (boolean, required)
- `tool_latency_secs` (double, required, default: 0)
- `error_type` (string, required, default: )
- `raw_error_message` (string, required, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, required)
- `type` ("api_integration_webhook", required)
- `integration_id` (string, required, default: )
- `credential_id` (string, required, default: )
- `integration_connection_id` (string, required, default: )

### ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("workflow", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (WorkflowToolResponseModelOutput, optional) — ワークフローツールのレスポンスに共通するモデルです。

### MetricRecord

- `elapsed_time` (double, required)

### RagChunkMetadata

- `document_id` (string, required)
- `chunk_id` (string, required)
- `vector_distance` (double, required)

### LlmInputOutputTokensUsage

- `input` (LlmTokensCategoryUsage, optional)
- `input_cache_read` (LlmTokensCategoryUsage, optional)
- `input_cache_write` (LlmTokensCategoryUsage, optional)
- `output_total` (LlmTokensCategoryUsage, optional)

### LiteralJsonSchemaProperty

リテラルJSON型のスキーマプロパティです。重要：設定できるのは、description（LLMが値を提供）、dynamic_variable（変数からの値）、is_system_provided（システムが値を提供）、constant_value（固定値）、is_omitted（パラメータを省略）のうち1つだけです。これらは相互排他的です。

- `type` (LiteralJsonSchemaPropertyType, required)
- `description` (string, optional, default: ) — プロパティの説明。設定すると、LLMはこの説明に基づいて値を提供します。dynamic_variable、is_system_provided、constant_value、is_omittedとは併用できません。
- `enum` (list of string, optional) — List of allowed string values for string type parameters
- `is_system_provided` (boolean, optional, default: false) — trueの場合、値は実行時にシステムによって設定されます。API Integration Webhookツールでテンプレート化に使用されます。description、dynamic_variable、constant_value、is_omittedとは併用できません。
- `dynamic_variable` (string, optional, default: ) — このプロパティの値に使用する動的変数の名前。description、is_system_provided、constant_value、is_omittedとは併用できません。
- `allowed_values` (AllowedValues, optional) — LLMが提供する値に対するサーバー側の拒否ガードです。ランタイムは、このオブジェクトで指定された許可セット外の値を拒否します。このセットはenumとしてLLMには公開されません。値のソースが`description`の場合のみサポートされ、dynamic_variable、is_system_provided、constant_value、is_omittedとの組み合わせは拒否されます。
- `constant_value` (LiteralJsonSchemaPropertyConstantValue, optional) — このプロパティに使用する定数値です。description、dynamic_variable、is_system_provided、is_omittedとは同時に使用できません。
- `is_omitted` (boolean, optional, default: false) — trueの場合、このパラメータはリクエストから完全に省略されます。任意パラメータでのみ有効です。description、dynamic_variable、is_system_provided、constant_valueとは併用できません。
- `allowed_values_dynamic_variable` (string, optional, default: , deprecated) — 非推奨：代わりに`allowed_values`を使用してください。設定すると、LLMが値を提供しますが、実行時にはこの動的変数が保持するリストにない値を拒否します（["ws_alpha", "ws_beta"]のようなJSON配列である必要があります）。LLMがサーバー検証済みのセット（例：現在のユーザーにアクセスが許可されているID）から選択できるようにする場合に使用します。descriptionが必要です。dynamic_variable、is_system_provided、constant_value、is_omittedとは同時に使用できません。

### BuiltInToolsOutput

会話型エージェントに付与できるシステムツール。 意図的にConversationalBuiltInToolsという名前にはしていません。BuiltInToolsInputと BuiltInToolsOutputは、パブリックAPI仕様および生成されるSDKの一部です。

- `transfer_to_agent` (SystemToolConfigOutput, optional) — エージェント転送ツール
- `end_call` (SystemToolConfigOutput, optional) — 通話終了ツール
- `language_detection` (SystemToolConfigOutput, optional) — 言語検出ツール。
- `transfer_to_number` (SystemToolConfigOutput, optional) — 電話番号転送ツール
- `skip_turn` (SystemToolConfigOutput, optional) — ターンスキップツール
- `play_keypad_touch_tone` (SystemToolConfigOutput, optional) — DTMF再生ツール
- `voicemail_detection` (SystemToolConfigOutput, optional) — 留守番電話検出ツール

### KnowledgeBaseLocator

- `type` (enum, required) — ナレッジベースのタイプ
  - Allowed values: `file`, `url`, `text`, `folder`
- `name` (string, required) — ナレッジベースの名前。
- `id` (string, required) — ナレッジベースのID
- `usage_mode` (enum, optional, default: auto) — ナレッジベースの使用モード
  - Allowed values: `prompt`, `auto`

### CustomLlm

- `url` (string, required) — Chat Completions互換エンドポイントのURL
- `model_id` (string, optional) — URLが複数のモデルを提供する場合に使用するモデルID。
- `api_key` (CustomLlmApiKey, optional) — 認証用のAPIキーです。ワークスペースシークレット参照\{'secret\_id': '...'}または環境変数参照\{'env\_var\_label': '...'}のいずれかです。
- `auth_connection` (CustomLlmAuthConnection, optional) — 認証用の任意のワークスペース認証接続。Authorization Bearerトークンを生成する認証接続のみサポートされます。Basic認証、mTLS、カスタムヘッダー、URLシークレットの認証接続はサポートされません。
- `request_headers` (map from string to CustomLlmRequestHeadersValue, optional) — リクエストに含めるヘッダー
- `api_version` (string, optional) — リクエストに使用するAPIバージョン。
- `api_type` (enum, optional, default: chat_completions) — 使用するAPIタイプ（chat_completions、responses、またはwebsocket）。
  - Allowed values: `chat_completions`, `responses`, `websocket`

### RagConfigOutput

- `enabled` (boolean, optional, default: false)
- `embedding_model` (enum, optional, default: e5_mistral_7b_instruct)
  - Allowed values: `e5_mistral_7b_instruct`, `multilingual_e5_large_instruct`
- `max_vector_distance` (double, optional, default: 0.6) — 取得したチャンクの最大ベクトル距離。
- `max_documents_length` (integer, optional, default: 50000) — RAGから取得するドキュメントチャンクの合計長の上限。
- `max_retrieved_rag_chunks_count` (integer, optional, default: 20) — ベクトルストアから最初に取得するRAGドキュメントチャンクの最大数。その後、ベクトル距離と合計長に基づいてさらにフィルタリングされます。
- `num_candidates` (integer, optional) — ANNベクトル検索で評価する候補数です。数が多いほど結果は改善しますが、レイテンシーも増加します。推奨される最小値は100です。無効にした場合は、デフォルト値が使用されます。
- `query_rewrite_prompt_override` (string, optional) — RAG検索前にユーザークエリを書き換えるためのカスタムプロンプト。会話履歴は末尾に自動で追加されます。未設定の場合はデフォルトのプロンプトが使用されます。
- `knowledge_base_tool_info` (KnowledgeBaseToolInfo, optional) — 設定すると、エージェントは従来のknowledge_base_ragツールではなくknowledge_baseツールを使用します。Noneは、エージェントがオプトインしていないことを意味します。

### PromptAgentApiModelOutputBackupLlmConfig

バックアップLLMカスケードの設定です。無効化するか、システムのデフォルトを使用するか、カスタムの順序を指定できます。

- `preference`: `default`
- `preference`: `disabled`
- `preference`: `override`
  - `order` (list of enum, required)
    - Allowed values: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4-turbo`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.2-chat-latest`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, `gpt-5-mini`, `gpt-5-nano`, `gpt-3.5-turbo`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemini-4-argon`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-sonnet-4`, `claude-haiku-4-5`, `claude-haiku-5-5`, `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-5-sonnet-v1`, `claude-3-haiku`, `grok-beta`, `custom-llm`, `qwen3-4b`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `qwen35-397b-a17b`, `gpt-oss-20b`, `gpt-oss-120b`, `glm-45-air-fp8`, `glm-52`, `deepseek-v41-flash`, `nemotron-35-super-vl-nvfp4`, `gemini-2.5-flash-preview-09-2025`, `gemini-2.5-flash-lite-preview-09-2025`, `gemini-2.5-flash-preview-05-20`, `gemini-2.5-flash-preview-04-17`, `gemini-2.5-flash-lite-preview-06-17`, `gemini-2.0-flash-lite-001`, `gemini-2.0-flash-001`, `gemini-1.5-flash-002`, `gemini-1.5-flash-001`, `gemini-1.5-pro-002`, `gemini-1.5-pro-001`, `claude-sonnet-4@20250514`, `claude-sonnet-4-5@20250929`, `claude-haiku-4-5@20251001`, `claude-3-7-sonnet@20250219`, `claude-3-5-sonnet@20240620`, `claude-3-5-sonnet-v2@20241022`, `claude-3-haiku@20240307`, `gpt-5-2025-08-07`, `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.4-2026-03-05`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano-2026-03-17`, `gpt-5.5-2026-04-23`, `gpt-5-mini-2025-08-07`, `gpt-5-nano-2025-08-07`, `gpt-4.1-2025-04-14`, `gpt-4.1-mini-2025-04-14`, `gpt-4.1-nano-2025-04-14`, `gpt-4o-mini-2024-07-18`, `gpt-4o-2024-11-20`, `gpt-4o-2024-08-06`, `gpt-4o-2024-05-13`, `gpt-4-0613`, `gpt-4-0314`, `gpt-4-turbo-2024-04-09`, `gpt-3.5-turbo-0125`, `gpt-3.5-turbo-1106`, `watt-tool-8b`, `watt-tool-70b`

### PromptAgentApiModelOutputToolsItem

ツールのタイプ

- `type`: `api_integration_webhook`
  - `api_integration_connection_id` (string, required)
  - `api_integration_id` (string, required)
  - `assignments` (list of DynamicVariableAssignment, required) — ツールレスポンスから値を抽出し、動的変数に割り当てるための設定
  - `description` (string, required) — ツールを使用するタイミングと機能の説明。
  - `dynamic_variables` (DynamicVariablesConfig, required) — 動的変数の設定
  - `execution_mode` (enum, required, default: immediate) — ツールをいつ、どのように実行するかを決定します。'immediate'はLLMから要求されるとすぐにツールを実行し、'post_tool_speech'はエージェントが話し終えるまで待ってから実行し、'async'はブロックせずにバックグラウンドでツールを実行します。長時間の処理に最適です。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `interruption_mode` (enum, required, default: allow) — このツール呼び出し中にユーザーがエージェントを中断できるかどうかを制御します。'allow'（デフォルト）はユーザーによる中断をいつでも許可します。'disable_during_tool'はツールの実行中のみ中断を抑制し、'disable_during_tool_and_turn'はツールの実行中と、その後に続くエージェントの応答中に中断を抑制します。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `name` (string, required)
  - `pre_tool_speech` (enum, required, default: auto) — このツールを呼び出す前にエージェントが話すかどうかを制御します。'auto'（デフォルト）は直近のツールレイテンシーに基づいて判断し、'force'は常にエージェントに話すよう求め、'off'はレイテンシーにかかわらず完全に無効化します。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, required, default: 20) — ツール呼び出しの完了を待機する最大時間（秒）。5秒から300秒の範囲で指定します（両端を含む）。
  - `tool_call_sound_behavior` (enum, required, default: auto) — ツール呼び出し音をいつ再生するかを決定します。'auto'はツール実行前の発話がある場合にのみ再生し、'always'はすべてのツール呼び出しで再生します。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, required, default: auto) — エージェントと共有する前にツールエラーを処理する方法を制御します。'auto'はツールの種類に応じて処理方法を決定します（ネイティブインテグレーションでは要約、その他では非表示）。'summarized'はLLM生成の要約を送信し、'passthrough'は未加工のエラーを送信し、'hide'はエージェントとエラーを共有しません。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `tool_version` (string, required, default: 1.0.0) — APIインテグレーションツールのバージョン
  - `disable_interruptions` (boolean, required, default: false, deprecated) — 非推奨：代わりに`interruption_mode`を使用してください。trueの場合、このツールの実行中は、ユーザーはエージェントを中断できません。
  - `force_pre_tool_speech` (boolean, required, default: false, deprecated) — 非推奨：代わりに`pre_tool_speech`を使用してください。trueの場合、エージェントはツール呼び出し前に発話します。
  - `api_schema_overrides` (ApiIntegrationWebhookOverrides, optional) — ベースapi_schemaに適用されるユーザーオーバーライド
  - `tool_call_sound` (enum, optional) — ツール実行中に再生する定義済みツール呼び出しサウンドの種類。指定しない場合、ツール呼び出しサウンドは再生されません。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
- `type`: `client`
  - `description` (string, required) — ツールを使用するタイミングと機能の説明。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — ツールレスポンスから値を抽出し、動的変数に割り当てるための設定
  - `dynamic_variables` (DynamicVariablesConfig, optional) — 動的変数の設定
  - `execution_mode` (enum, optional, default: immediate) — ツールをいつ、どのように実行するかを決定します。'immediate'はLLMから要求されるとすぐにツールを実行し、'post_tool_speech'はエージェントが話し終えるまで待ってから実行し、'async'はブロックせずにバックグラウンドでツールを実行します。長時間の処理に最適です。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `expects_response` (boolean, optional, default: false) — trueの場合、このツールの呼び出しは、LLMに渡される応答をクライアントが返すまで会話をブロックします。falseの場合は、クライアントの応答を待たずに会話を続けます。これはユーザーにコンテンツを表示しつつ、会話をブロックしない場合に便利です。
  - `interruption_mode` (enum, optional, default: allow) — このツール呼び出し中にユーザーがエージェントを中断できるかどうかを制御します。'allow'（デフォルト）はユーザーによる中断をいつでも許可します。'disable_during_tool'はツールの実行中のみ中断を抑制し、'disable_during_tool_and_turn'はツールの実行中と、その後に続くエージェントの応答中に中断を抑制します。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `parameters` (ObjectJsonSchemaPropertyOutput, optional) — クライアントに渡すパラメーターのスキーマ
  - `pre_tool_speech` (enum, optional, default: auto) — このツールを呼び出す前にエージェントが話すかどうかを制御します。'auto'（デフォルト）は直近のツールレイテンシーに基づいて判断し、'force'は常にエージェントに話すよう求め、'off'はレイテンシーにかかわらず完全に無効化します。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — ツール呼び出しの完了を待機する最大時間（秒）。1～120秒（両端を含む）、またはクライアントの応答を無期限に待機する場合は-1を指定します（expects_responseが必要です）。
  - `tool_call_sound` (enum, optional) — ツール実行中に再生する定義済みツール呼び出しサウンドの種類。指定しない場合、ツール呼び出しサウンドは再生されません。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — ツール呼び出し音をいつ再生するかを決定します。'auto'はツール実行前の発話がある場合にのみ再生し、'always'はすべてのツール呼び出しで再生します。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — エージェントと共有する前にツールエラーを処理する方法を制御します。'auto'はツールの種類に応じて処理方法を決定します（ネイティブインテグレーションでは要約、その他では非表示）。'summarized'はLLM生成の要約を送信し、'passthrough'は未加工のエラーを送信し、'hide'はエージェントとエラーを共有しません。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`interruption_mode`を使用してください。trueの場合、このツールの実行中は、ユーザーはエージェントを中断できません。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`pre_tool_speech`を使用してください。trueの場合、エージェントはツール呼び出し前に発話します。
- `type`: `mcp`
  - `value` (any, required)
- `type`: `smb`
  - `value` (any, required)
- `type`: `system`
  - `name` (string, required)
  - `params` (SystemToolConfigOutputParams, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — ツールレスポンスから値を抽出し、動的変数に割り当てるための設定
  - `description` (string, optional, default: ) — ツールを使用するタイミングと機能の説明。空欄の場合は、特定のツールタイプ向けに最適化されたデフォルトの説明が使用されます。
  - `interruption_mode` (enum, optional, default: allow) — このツール呼び出し中にユーザーがエージェントを中断できるかどうかを制御します。'allow'（デフォルト）はユーザーによる中断をいつでも許可します。'disable_during_tool'はツールの実行中のみ中断を抑制し、'disable_during_tool_and_turn'はツールの実行中と、その後に続くエージェントの応答中に中断を抑制します。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — このツールを呼び出す前にエージェントが話すかどうかを制御します。'auto'（デフォルト）は直近のツールレイテンシーに基づいて判断し、'force'は常にエージェントに話すよう求め、'off'はレイテンシーにかかわらず完全に無効化します。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — ツール呼び出しの完了を待機する最大時間（秒）。
  - `tool_call_sound` (enum, optional) — ツール実行中に再生する定義済みツール呼び出しサウンドの種類。指定しない場合、ツール呼び出しサウンドは再生されません。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — ツール呼び出し音をいつ再生するかを決定します。'auto'はツール実行前の発話がある場合にのみ再生し、'always'はすべてのツール呼び出しで再生します。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — エージェントと共有する前にツールエラーを処理する方法を制御します。'auto'はツールの種類に応じて処理方法を決定します（ネイティブインテグレーションでは要約、その他では非表示）。'summarized'はLLM生成の要約を送信し、'passthrough'は未加工のエラーを送信し、'hide'はエージェントとエラーを共有しません。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`interruption_mode`を使用してください。trueの場合、このツールの実行中は、ユーザーはエージェントを中断できません。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`pre_tool_speech`を使用してください。trueの場合、エージェントはツール呼び出し前に発話します。
- `type`: `webhook`
  - `api_schema` (WebhookToolApiSchemaConfigOutput, required) — 送信Webhookのスキーマ。パラメータとURL仕様を含みます。
  - `description` (string, required) — ツールを使用するタイミングと機能の説明。
  - `name` (string, required)
  - `assignments` (list of DynamicVariableAssignment, optional) — ツールレスポンスから値を抽出し、動的変数に割り当てるための設定
  - `dynamic_variables` (DynamicVariablesConfig, optional) — 動的変数の設定
  - `execution_mode` (enum, optional, default: immediate) — ツールをいつ、どのように実行するかを決定します。'immediate'はLLMから要求されるとすぐにツールを実行し、'post_tool_speech'はエージェントが話し終えるまで待ってから実行し、'async'はブロックせずにバックグラウンドでツールを実行します。長時間の処理に最適です。
    - Allowed values: `immediate`, `post_tool_speech`, `async`
  - `follow_redirects` (boolean, optional, default: false) — エンドポイントからのリダイレクトを解決し、最終レスポンスを返すかどうか。リダイレクトは1回だけ追跡され、リクエスト本文なしのGETとして実行されます。このツールで設定した内容（ヘッダー、認証、クライアント証明書）はリダイレクト先に送信されません。エンドポイントとリダイレクト先の両方でHTTPSを使用する必要があります。APIインテグレーションツールではサポートされていません。
  - `follow_redirects_allowed_domains` (list of string, optional) — リダイレクト先として許可するドメイン（例：'test.example.com'）。リダイレクトをたどる場合に必要で、リスト外の宛先は拒否されます。
  - `interruption_mode` (enum, optional, default: allow) — このツール呼び出し中にユーザーがエージェントを中断できるかどうかを制御します。'allow'（デフォルト）はユーザーによる中断をいつでも許可します。'disable_during_tool'はツールの実行中のみ中断を抑制し、'disable_during_tool_and_turn'はツールの実行中と、その後に続くエージェントの応答中に中断を抑制します。
    - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
  - `pre_tool_speech` (enum, optional, default: auto) — このツールを呼び出す前にエージェントが話すかどうかを制御します。'auto'（デフォルト）は直近のツールレイテンシーに基づいて判断し、'force'は常にエージェントに話すよう求め、'off'はレイテンシーにかかわらず完全に無効化します。
    - Allowed values: `auto`, `force`, `off`
  - `response_timeout_secs` (integer, optional, default: 20) — ツール呼び出しの完了を待機する最大時間（秒）。5秒から300秒の範囲で指定します（両端を含む）。
  - `tool_call_sound` (enum, optional) — ツール実行中に再生する定義済みツール呼び出しサウンドの種類。指定しない場合、ツール呼び出しサウンドは再生されません。
    - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
  - `tool_call_sound_behavior` (enum, optional, default: auto) — ツール呼び出し音をいつ再生するかを決定します。'auto'はツール実行前の発話がある場合にのみ再生し、'always'はすべてのツール呼び出しで再生します。
    - Allowed values: `auto`, `always`
  - `tool_error_handling_mode` (enum, optional, default: auto) — エージェントと共有する前にツールエラーを処理する方法を制御します。'auto'はツールの種類に応じて処理方法を決定します（ネイティブインテグレーションでは要約、その他では非表示）。'summarized'はLLM生成の要約を送信し、'passthrough'は未加工のエラーを送信し、'hide'はエージェントとエラーを共有しません。
    - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
  - `disable_interruptions` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`interruption_mode`を使用してください。trueの場合、このツールの実行中は、ユーザーはエージェントを中断できません。
  - `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`pre_tool_speech`を使用してください。trueの場合、エージェントはツール呼び出し前に発話します。

### ConversationHistoryTranscriptToolCallCommonModelInputToolDetails

- `type`: `api_integration_webhook`
  - `webhook_details` (ConversationHistoryTranscriptToolCallWebhookDetails, required)
  - `credential_id` (string, optional, default: )
  - `integration_connection_id` (string, optional, default: )
  - `integration_id` (string, optional, default: )
- `type`: `client`
  - `parameters` (string, required)
- `type`: `mcp`
  - `approval_policy` (string, required)
  - `integration_type` (string, required)
  - `mcp_server_id` (string, required)
  - `mcp_server_name` (string, required)
  - `mcp_tool_description` (string, optional, default: )
  - `mcp_tool_name` (string, optional, default: )
  - `parameters` (map from string to string, optional)
  - `requires_approval` (boolean, optional, default: false)
- `type`: `webhook`
  - `method` (string, required)
  - `url` (string, required)
  - `body` (string, optional)
  - `headers` (map from string to string, optional)
  - `path_params` (map from string to string, optional)
  - `query_params` (map from string to string, optional)

### ConversationHistoryTranscriptSystemToolResultCommonModelInput

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("system", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (ConversationHistoryTranscriptSystemToolResultCommonModelInputResult, optional)

### ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModelInput

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("api_integration_webhook", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `integration_id` (string, optional, default: )
- `credential_id` (string, optional, default: )
- `integration_connection_id` (string, optional, default: )

### ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput

- `request_id` (string, required)
- `tool_name` (string, required)
- `result_value` (string, required)
- `is_error` (boolean, required)
- `tool_has_been_called` (boolean, required)
- `type` ("workflow", required)
- `is_blocked` (boolean, optional, default: false)
- `tool_latency_secs` (double, optional, default: 0)
- `error_type` (string, optional, default: )
- `raw_error_message` (string, optional, default: )
- `dynamic_variable_updates` (list of DynamicVariableUpdateCommonModel, optional)
- `result` (WorkflowToolResponseModelInput, optional) — ワークフローツールのレスポンスに共通するモデルです。

### ConversationHistoryTranscriptToolCallWebhookDetails

- `method` (string, required)
- `url` (string, required)
- `type` ("webhook", optional)
- `headers` (map from string to string, optional)
- `path_params` (map from string to string, optional)
- `query_params` (map from string to string, optional)
- `body` (string, optional)

### DynamicVariableUpdateCommonModel

ツール実行中に発生した動的変数の更新を追跡します。

- `variable_name` (string, required)
- `new_value` (string, required)
- `updated_at` (double, required)
- `tool_name` (string, required)
- `tool_request_id` (string, required)
- `old_value` (string, optional)

### ConversationHistoryTranscriptSystemToolResultCommonModelOutputResult

- `result_type`: `dummy`
- `result_type`: `end_call_success`
  - `message` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `end_procedure_error`
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_id`
  - `procedure_id` (string, optional)
- `result_type`: `end_procedure_success`
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: )
  - `status` ("success", optional)
- `result_type`: `knowledge_base_rag_success`
  - `chunk_count` (integer, optional, default: 0) — 取得した関連チャンク数
  - `chunks` (list of KnowledgeBaseRagChunkModel, optional) — 取得されたチャンク。rag-result-in-tool-resultモードでのみ設定されます
  - `message` (string, optional, default: Referenced knowledge base.) — 検索結果に関するLLM向けの人間が読めるステータス
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_documents`, `no_results`
- `result_type`: `knowledge_base_success`
  - `chunk_count` (integer, optional, default: 0)
  - `message` (string, optional, default: Referenced knowledge base.)
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_matching_documents`, `no_results`
- `result_type`: `language_detection_success`
  - `language` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `play_dtmf_error`
  - `error` (string, required)
  - `details` (string, optional)
  - `status` ("error", optional)
- `result_type`: `play_dtmf_success`
  - `dtmf_tones` (string, required)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `skip_turn_success`
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `start_procedure_error`
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_name`, `already_active`
  - `procedure_id` (string, optional)
- `result_type`: `start_procedure_success`
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: Procedure is now started. Follow its instructions from the <active-procedures> section of your system prompt.)
  - `procedure_entry_workflow_node` (string, optional)
  - `procedure_return_workflow_node` (string, optional)
  - `status` ("success", optional)
- `result_type`: `testing_tool_result`
  - `reason` (string, optional, default: Skipping tool call in test mode)
  - `status` ("success", optional)
- `result_type`: `transfer_to_agent_error`
  - `error` (string, required)
  - `from_agent` (string, required)
  - `status` ("error", optional)
- `result_type`: `transfer_to_agent_success`
  - `condition` (string, required)
  - `from_agent` (string, required)
  - `to_agent` (string, required)
  - `branch_info` (TransferToAgentToolResultSuccessModelOutputBranchInfo, optional)
  - `delay_ms` (integer, optional, default: 0)
  - `enable_transferred_agent_first_message` (boolean, optional, default: false)
  - `preserve_client_tts_overrides` (boolean, optional, default: false)
  - `preserve_voice_settings` (boolean, optional, default: false)
  - `status` ("success", optional)
  - `to_node` (string, optional)
  - `transfer_message` (string, optional)
- `result_type`: `transfer_to_number_amazon_connect_success`
  - `client_message` (string, optional) — セッションがAmazon Connectに戻される前に、発信者へ読み上げるメッセージ。
  - `note` (string, optional) — エージェントが無効なオプションを返し、設定済みの唯一のオプションが使用された場合に設定されます。
  - `reason` (string, optional) — Escalateの結果とともにAmazon Connectへ送信される、エージェントがエスカレーションした理由。
  - `status` ("success", optional)
- `result_type`: `transfer_to_number_error`
  - `error` (string, required)
  - `details` (string, optional)
  - `status` ("error", optional)
- `result_type`: `transfer_to_number_exotel_success`
  - `transfer_number` (string, required)
  - `agent_message` (string, optional)
  - `note` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `transfer_to_number_sip_success`
  - `transfer_number` (string, required)
  - `note` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `transfer_to_number_twilio_success`
  - `agent_message` (string, required)
  - `conference_name` (string, required)
  - `transfer_number` (string, required)
  - `client_message` (string, optional)
  - `note` (string, optional)
  - `post_dial_digits` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `voicemail_detection_success`
  - `reason` (string, optional)
  - `status` ("success", optional)
  - `voicemail_message` (string, optional)

### WorkflowToolResponseModelOutput

ワークフローツールのレスポンスに共通するモデルです。

- `steps` (list of WorkflowToolResponseModelOutputStepsItem, optional)

### LlmTokensCategoryUsage

- `tokens` (integer, optional, default: 0)
- `price` (double, optional, default: 0)

### LiteralJsonSchemaPropertyType

### AllowedValues

- `dynamic_variable` (string, required) — 許可された値のJSON配列に解決される必要がある動的変数の名前（例：["ws_alpha", "ws_beta"]）。システム変数は、リストに解決される場合にのみ機能します。

### LiteralJsonSchemaPropertyConstantValue

このプロパティに使用する定数値です。description、dynamic_variable、is_system_provided、is_omittedとは同時に使用できません。

### SystemToolConfigOutput

システムツールは、サーバー上のシステムメソッドを呼び出すために使用するツールです。

- `name` (string, required)
- `params` (SystemToolConfigOutputParams, required)
- `type` ("system", optional) — ツールのタイプ
- `description` (string, optional, default: ) — ツールを使用するタイミングと機能の説明。空欄の場合は、特定のツールタイプ向けに最適化されたデフォルトの説明が使用されます。
- `response_timeout_secs` (integer, optional, default: 20) — ツール呼び出しの完了を待機する最大時間（秒）。
- `interruption_mode` (enum, optional, default: allow) — このツール呼び出し中にユーザーがエージェントを中断できるかどうかを制御します。'allow'（デフォルト）はユーザーによる中断をいつでも許可します。'disable_during_tool'はツールの実行中のみ中断を抑制し、'disable_during_tool_and_turn'はツールの実行中と、その後に続くエージェントの応答中に中断を抑制します。
  - Allowed values: `allow`, `disable_during_tool`, `disable_during_tool_and_turn`
- `pre_tool_speech` (enum, optional, default: auto) — このツールを呼び出す前にエージェントが話すかどうかを制御します。'auto'（デフォルト）は直近のツールレイテンシーに基づいて判断し、'force'は常にエージェントに話すよう求め、'off'はレイテンシーにかかわらず完全に無効化します。
  - Allowed values: `auto`, `force`, `off`
- `assignments` (list of DynamicVariableAssignment, optional) — ツールレスポンスから値を抽出し、動的変数に割り当てるための設定
- `tool_call_sound` (enum, optional) — ツール実行中に再生する定義済みツール呼び出しサウンドの種類。指定しない場合、ツール呼び出しサウンドは再生されません。
  - Allowed values: `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
- `tool_call_sound_behavior` (enum, optional, default: auto) — ツール呼び出し音をいつ再生するかを決定します。'auto'はツール実行前の発話がある場合にのみ再生し、'always'はすべてのツール呼び出しで再生します。
  - Allowed values: `auto`, `always`
- `tool_error_handling_mode` (enum, optional, default: auto) — エージェントと共有する前にツールエラーを処理する方法を制御します。'auto'はツールの種類に応じて処理方法を決定します（ネイティブインテグレーションでは要約、その他では非表示）。'summarized'はLLM生成の要約を送信し、'passthrough'は未加工のエラーを送信し、'hide'はエージェントとエラーを共有しません。
  - Allowed values: `auto`, `summarized`, `passthrough`, `hide`
- `disable_interruptions` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`interruption_mode`を使用してください。trueの場合、このツールの実行中は、ユーザーはエージェントを中断できません。
- `force_pre_tool_speech` (boolean, optional, default: false, deprecated) — 非推奨：代わりに`pre_tool_speech`を使用してください。trueの場合、エージェントはツール呼び出し前に発話します。

### CustomLlmApiKey

認証用のAPIキーです。ワークスペースシークレット参照\{'secret\_id': '...'}または環境変数参照\{'env\_var\_label': '...'}のいずれかです。

### CustomLlmAuthConnection

認証用の任意のワークスペース認証接続。Authorization Bearerトークンを生成する認証接続のみサポートされます。Basic認証、mTLS、カスタムヘッダー、URLシークレットの認証接続はサポートされません。

### CustomLlmRequestHeadersValue

### KnowledgeBaseToolInfo

- `enabled_strategies` (list of enum, optional) — モデルに公開する検索戦略です。空にすることはできません。
  - Allowed values: `cat`, `keyword`, `semantic`, `ls`

### DynamicVariableAssignment

ツールレスポンスから値を抽出し、動的変数に割り当てるための設定。

- `dynamic_variable` (string, required) — 抽出した値を割り当てる動的変数の名前。
- `value_path` (string, required) — ソースから値を抽出するドット記法のパス（例：'user.name'または'data.0.id'）
- `source` ("response", optional) — 値の抽出元。現在は「response」のみをサポートしています。
- `sanitize` (boolean, optional, default: false) — trueの場合、この割り当ての値はLLMと文字起こしに送信する前にツール応答から削除されますが、変数の割り当てには引き続き使用されます。
- `preserve_native_type` (boolean, optional, default: false) — trueの場合、ツール応答から抽出された非スカラー値（リスト、オブジェクト）は、JSON文字列に変換せずネイティブ型のまま保存されます。抽出した配列をリスト動的変数として直接使用するには有効にしてください。

### DynamicVariablesConfig

- `dynamic_variable_placeholders` (map from string to any, optional) — 動的変数プレースホルダーとその値の辞書です。

### ApiIntegrationWebhookOverrides

- `schema_overrides` (map from string to ApiIntegrationWebhookOverridesSchemaOverridesValue, optional)
- `response_filter_mode` (enum, optional, default: all) — エージェントに表示される前にツール応答をフィルタリングする方法を制御します。
  - Allowed values: `all`, `allow`, `hide_all`
- `response_filters` (list of string, optional)
- `request_headers` (map from string to ApiIntegrationWebhookOverridesRequestHeadersValue, optional)

### ObjectJsonSchemaPropertyOutput

- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 設定すると、実行時にパラメーター全体へこの動的変数から値が入力されます。description（LLM提供の値）、constant_value、is_omittedとは併用できません。
- `constant_value` (map from string to any, optional) — 設定すると、実行時にオブジェクト全体でこの定数JSON値を使用します。description（LLM提供のオブジェクト）、dynamic_variable、is_omittedとは併用できません。
- `is_omitted` (boolean, optional, default: false) — trueの場合、このパラメータはリクエストから完全に省略されます。任意パラメータでのみ有効です。description、dynamic_variable、constant_valueとは併用できません。
- `type` ("object", optional)
- `required` (list of string, optional)
- `properties` (map from string to ObjectJsonSchemaPropertyOutputPropertiesValue, optional)
- `required_constraints` (RequiredConstraints, optional) — 必須フィールドを対象とするanyOf/allOf構成制約のラッパー。

### SystemToolConfigOutputParams

- `system_tool_type`: `end_call`
- `system_tool_type`: `end_procedure`
  - `procedures` (map from string to EndProcedureToolConfigProceduresValue, optional)
- `system_tool_type`: `knowledge_base`
  - `enabled_strategies` (list of enum, optional)
    - Allowed values: `cat`, `keyword`, `semantic`, `ls`
- `system_tool_type`: `knowledge_base_rag`
- `system_tool_type`: `language_detection`
  - `only_at_conversation_start` (boolean, optional, default: false) — 最初の2回のユーザーターンで言語切り替えが行われない場合、それ以降の切り替え試行は失敗し、会話は現在の言語のままになります。その間に言語が切り替わった場合は、以降も切り替えを利用できます。誤った切り替えが発生する可能性を減らすには有効にしてください。
- `system_tool_type`: `play_keypad_touch_tone`
  - `suppress_turn_after_dtmf` (boolean, optional, default: false) — trueの場合、エージェントはDTMFトーンの再生後に追加の音声を生成しません。これにより、エージェントの音声がIVRシステムに干渉することを防ぎます。
  - `use_out_of_band_dtmf` (boolean, optional, default: true) — DTMFトーンをインバンドオーディオではなく、アウトオブバンドRTPイベント（RFC 4733）として送信します。SIPトランクからインポートした電話番号でのみ有効です。
- `system_tool_type`: `skip_turn`
  - `wait_timeout_secs` (double, optional, default: -1) — skip_turnの後、エージェントが文脈に応じた状況確認を生成するまでの待機秒数です。待機中は「End conversation after silence」タイマーが一時停止します。-1を指定すると待機を無効にします。この場合、skip_turnの後、呼び出し元が話すまでエージェントは沈黙し、タイマーは動作し続けます。音声会話にのみ適用されます。
- `system_tool_type`: `start_procedure`
  - `procedures` (map from string to StartProcedureToolConfigProceduresValue, optional)
- `system_tool_type`: `transfer_to_agent`
  - `transfers` (list of AgentTransferOutput, required)
- `system_tool_type`: `transfer_to_number`
  - `transfers` (list of PhoneNumberTransfer, required)
  - `enable_client_message` (boolean, optional, default: true) — 転送待ちのクライアントにメッセージを再生するかどうか。後方互換性のため、デフォルトはtrueです。
- `system_tool_type`: `voicemail_detection`
  - `voicemail_message` (string, optional) — 留守番電話を検出した際に残す任意のメッセージです。指定しない場合、留守番電話を検出すると通話はすぐに終了します。動的変数（例：\{\{system\_\_time}}、\{\{system\_\_call\_duration\_secs}}、\{\{custom\_variable}}）に対応しています。

### WebhookToolApiSchemaConfigOutput

- `url` (string, required) — Webhookの送信先URLです。パスパラメーターを含めることができます。例：[https://example.com/agents/\{agent\_id}](https://example.com/agents/\{agent_id})
- `request_headers` (map from string to WebhookToolApiSchemaConfigOutputRequestHeadersValue, optional) — リクエストに含めるヘッダー
- `method` (enum, optional, default: GET) — Webhookで使用するHTTPメソッド
  - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
- `path_params_schema` (map from string to LiteralJsonSchemaProperty, optional) — パスパラメータがある場合のスキーマです。キーはURL内のプレースホルダーと一致している必要があります。
- `query_params_schema` (QueryParamsJsonSchemaOutput, optional) — クエリパラメータがある場合のスキーマです。これらはクエリパラメータとしてURLの末尾に追加されます。注意：クエリパラメータ内のプロパティはすべてリテラル型である必要があります。
- `request_body_schema` (ObjectJsonSchemaPropertyOutput, optional) — ボディパラメータがある場合のスキーマです。POST／PATCH／PUTリクエストで使用します。スキーマはJSONボディとして送信されるオブジェクトである必要があります。
- `response_body_schema` (ObjectJsonSchemaPropertyOutput, optional) — 想定されるレスポンス本文の構造を記述するスキーマ。ドキュメント専用であり、LLMには公開されません。
- `response_filter` (ResponseFilter, optional) — LLMが応答を見る前に適用する任意の許可リストフィルターです。大きな応答によってコンテキストが汚染されるのを防ぎます。デフォルトでは完全な応答です。
- `content_type` (enum, optional, default: application/json) — リクエスト本文のコンテンツタイプです。POST／PUT／PATCHリクエストにのみ適用されます。
  - Allowed values: `application/json`, `application/x-www-form-urlencoded`
- `auth_resolved_params` (list of string, optional) — path_params_schemaではなく、認証接続から解決されるURLプレースホルダー（例：UrlSecretAuthConnectionを介して挿入されたシークレット）。
- `auth_connection` (WebhookToolApiSchemaConfigOutputAuthConnection, optional) — このWebhookの認証に使用する任意の認証接続

### ConversationHistoryTranscriptSystemToolResultCommonModelInputResult

- `result_type`: `dummy`
- `result_type`: `end_call_success`
  - `message` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `end_procedure_error`
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_id`
  - `procedure_id` (string, optional)
- `result_type`: `end_procedure_success`
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: )
  - `status` ("success", optional)
- `result_type`: `knowledge_base_rag_success`
  - `chunk_count` (integer, optional, default: 0) — 取得した関連チャンク数
  - `chunks` (list of KnowledgeBaseRagChunkModel, optional) — 取得されたチャンク。rag-result-in-tool-resultモードでのみ設定されます
  - `message` (string, optional, default: Referenced knowledge base.) — 検索結果に関するLLM向けの人間が読めるステータス
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_documents`, `no_results`
- `result_type`: `knowledge_base_success`
  - `chunk_count` (integer, optional, default: 0)
  - `message` (string, optional, default: Referenced knowledge base.)
  - `status` (enum, optional, default: success)
    - Allowed values: `success`, `no_matching_documents`, `no_results`
- `result_type`: `language_detection_success`
  - `language` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `play_dtmf_error`
  - `error` (string, required)
  - `details` (string, optional)
  - `status` ("error", optional)
- `result_type`: `play_dtmf_success`
  - `dtmf_tones` (string, required)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `skip_turn_success`
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `start_procedure_error`
  - `message` (string, required)
  - `status` (enum, required)
    - Allowed values: `not_found`, `invalid_name`, `already_active`
  - `procedure_id` (string, optional)
- `result_type`: `start_procedure_success`
  - `procedure_id` (string, required)
  - `procedure_name` (string, required)
  - `message` (string, optional, default: Procedure is now started. Follow its instructions from the <active-procedures> section of your system prompt.)
  - `procedure_entry_workflow_node` (string, optional)
  - `procedure_return_workflow_node` (string, optional)
  - `status` ("success", optional)
- `result_type`: `testing_tool_result`
  - `reason` (string, optional, default: Skipping tool call in test mode)
  - `status` ("success", optional)
- `result_type`: `transfer_to_agent_error`
  - `error` (string, required)
  - `from_agent` (string, required)
  - `status` ("error", optional)
- `result_type`: `transfer_to_agent_success`
  - `condition` (string, required)
  - `from_agent` (string, required)
  - `to_agent` (string, required)
  - `branch_info` (TransferToAgentToolResultSuccessModelInputBranchInfo, optional)
  - `delay_ms` (integer, optional, default: 0)
  - `enable_transferred_agent_first_message` (boolean, optional, default: false)
  - `preserve_client_tts_overrides` (boolean, optional, default: false)
  - `preserve_voice_settings` (boolean, optional, default: false)
  - `status` ("success", optional)
  - `to_node` (string, optional)
  - `transfer_message` (string, optional)
- `result_type`: `transfer_to_number_amazon_connect_success`
  - `client_message` (string, optional) — セッションがAmazon Connectに戻される前に、発信者へ読み上げるメッセージ。
  - `note` (string, optional) — エージェントが無効なオプションを返し、設定済みの唯一のオプションが使用された場合に設定されます。
  - `reason` (string, optional) — Escalateの結果とともにAmazon Connectへ送信される、エージェントがエスカレーションした理由。
  - `status` ("success", optional)
- `result_type`: `transfer_to_number_error`
  - `error` (string, required)
  - `details` (string, optional)
  - `status` ("error", optional)
- `result_type`: `transfer_to_number_exotel_success`
  - `transfer_number` (string, required)
  - `agent_message` (string, optional)
  - `note` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `transfer_to_number_sip_success`
  - `transfer_number` (string, required)
  - `note` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `transfer_to_number_twilio_success`
  - `agent_message` (string, required)
  - `conference_name` (string, required)
  - `transfer_number` (string, required)
  - `client_message` (string, optional)
  - `note` (string, optional)
  - `post_dial_digits` (string, optional)
  - `reason` (string, optional)
  - `status` ("success", optional)
- `result_type`: `voicemail_detection_success`
  - `reason` (string, optional)
  - `status` ("success", optional)
  - `voicemail_message` (string, optional)

### WorkflowToolResponseModelInput

ワークフローツールのレスポンスに共通するモデルです。

- `steps` (list of WorkflowToolResponseModelInputStepsItem, optional)

### KnowledgeBaseRagChunkModel

- `chunk_id` (string, required)
- `document_id` (string, required)
- `content` (string, required)

### TransferToAgentToolResultSuccessModelOutputBranchInfo

- `branch_reason`: `configured`
  - `branch_id` (string, required)
- `branch_reason`: `defaulting_to_main`
  - `branch_id` (string, required)
- `branch_reason`: `traffic_split`
  - `branch_id` (string, required)
  - `traffic_percentage` (double, required)

### WorkflowToolResponseModelOutputStepsItem

- `type`: `edge`
  - `edge_id` (string, required)
  - `step_latency_secs` (double, required)
  - `target_node_id` (string, required)
- `type`: `max_iterations_exceeded`
  - `max_iterations` (integer, required)
  - `step_latency_secs` (double, required)
- `type`: `nested_tools`
  - `is_successful` (boolean, required)
  - `node_id` (string, required)
  - `requests` (list of ConversationHistoryTranscriptToolCallCommonModelOutput, required)
  - `results` (list of WorkflowToolNestedToolsStepModelOutputResultsItem, required)
  - `step_latency_secs` (double, required)

### ConvAiSecretLocator

エージェントのシークレットストア内のシークレットを参照するために使用します。

- `secret_id` (string, required)

### ConvAiEnvVarLocator

ラベルで環境変数を参照するために使用します。

- `env_var_label` (string, required)

### AuthConnectionLocator

ワークスペースの認証接続ストア内の認証接続を参照するために使用します。

- `auth_connection_id` (string, required)

### EnvironmentAuthConnectionLocator

ラベルで'auth_connection'型の環境変数を参照します。実行時には現在の環境の認証接続に解決され、該当しない場合はデフォルト環境にフォールバックします。

- `env_var_label` (string, required)

### ConvAiDynamicVariable

動的変数を参照するために使用します。

- `variable_name` (string, required)

### ApiIntegrationWebhookOverridesSchemaOverridesValue

- `source`: `constant`
  - `constant_value` (ConstantSchemaOverrideConstantValue, optional) — 使用する定数値
- `source`: `dynamic_variable`
  - `dynamic_variable` (string, required) — 使用する動的変数の名前。
- `source`: `llm`
  - `prompt` (string, optional) — LLMのプロンプトオーバーライド。指定しない場合は、元のスキーマの説明が使用されます。
- `source`: `omit`

### ApiIntegrationWebhookOverridesRequestHeadersValue

### ObjectJsonSchemaPropertyOutputPropertiesValue

### RequiredConstraints

必須フィールドを対象とするanyOf/allOf構成制約のラッパー。

- `any_of` (list of RequiredConstraint, optional)
- `all_of` (list of RequiredConstraint, optional)

### EndProcedureToolConfigProceduresValue

### StartProcedureToolConfigProceduresValue

### AgentTransferOutput

- `condition` (string, required)
- `agent_id` (string, optional)
- `branch_id` (string, optional)
- `node_id` (string, optional)
- `delay_ms` (integer, optional, default: 0)
- `transfer_message` (string, optional)
- `enable_transferred_agent_first_message` (boolean, optional, default: false)
- `is_workflow_node_transfer` (boolean, optional, default: false)
- `preserve_client_tts_overrides` (boolean, optional, default: false) — TTSクライアントのオーバーライドを転送先のエージェントに引き継ぐかどうかを定義します。
- `preserve_voice_settings` (boolean, optional, default: false) — ベース音声、TTSモデル、音声設定を転送先のエージェントに引き継ぐかどうかを定義します。

### PhoneNumberTransfer

- `transfer_destination` (PhoneNumberTransferTransferDestination, required)
- `condition` (string, required)
- `custom_sip_headers` (list of PhoneNumberTransferCustomSipHeadersItem, optional) — 通話転送時に含めるカスタムSIPヘッダー。各ヘッダーには静的な値または動的変数参照を指定できます。
- `transfer_type` (enum, optional, default: conference)
  - Allowed values: `blind`, `conference`, `sip_refer`
- `sip_refer_play_dialtone` (boolean, optional, default: true) — Trueの場合、SIP REFER転送の完了中に、元の通話レッグで呼び出し音が再生されます。この音はRTP経由でREFERを実行するSIPピアに送られるため、受信システム（SBCやコンタクトセンターなど）でこの音を聞かせたくない場合は無効にしてください。無効にすると、転送が完了するまで発信者には無音が聞こえます。SIP REFER転送でのみ使用できます。
- `uui` (UuiTransferConfig, optional) — SIP REFER転送に添付するUser-to-User Information（RFC 7433）。CRM識別子やエスカレーション理由などの通話コンテキストを、転送の境界を越えて引き継ぎます。
- `post_dial_digits` (PhoneNumberTransferPostDialDigits, optional) — 通話接続後に送信するDTMF数字（例：内線番号には'ww1234'）。静的値または動的変数参照を指定できます。0.5秒の一時停止には'w'を使用します。Twilio転送でのみサポートされます。
- `phone_number` (string, optional, deprecated)

### WebhookToolApiSchemaConfigOutputRequestHeadersValue

### QueryParamsJsonSchemaOutput

- `properties` (map from string to LiteralJsonSchemaProperty, required)
- `required` (list of string, optional)

### ResponseFilter

エージェントに表示される前にツールレスポンスをフィルタリングするための設定。

- `mode` (enum, optional, default: all) — ツール応答のフィルタリング方法を制御します。'all'は応答全体を返し、'allow'は指定したパスのみを返し、'hide_all'は応答全体を非表示にします。
  - Allowed values: `all`, `allow`, `hide_all`
- `filters` (list of string, optional) — モードが'allow'の場合に含めるドット記法のパス（例：['ticket.id', 'ticket.status']）。
- `content_type` ("application/json", optional) — レスポンスフィルタリング用のコンテンツタイプです。'application/json'のレスポンスのみがフィルタリングされます。

### WebhookToolApiSchemaConfigOutputAuthConnection

このWebhookの認証に使用する任意の認証接続

### TransferToAgentToolResultSuccessModelInputBranchInfo

- `branch_reason`: `configured`
  - `branch_id` (string, required)
- `branch_reason`: `defaulting_to_main`
  - `branch_id` (string, required)
- `branch_reason`: `traffic_split`
  - `branch_id` (string, required)
  - `traffic_percentage` (double, required)

### WorkflowToolResponseModelInputStepsItem

- `type`: `edge`
  - `edge_id` (string, required)
  - `step_latency_secs` (double, required)
  - `target_node_id` (string, required)
- `type`: `max_iterations_exceeded`
  - `max_iterations` (integer, required)
  - `step_latency_secs` (double, required)
- `type`: `nested_tools`
  - `is_successful` (boolean, required)
  - `node_id` (string, required)
  - `requests` (list of ConversationHistoryTranscriptToolCallCommonModelInput, required)
  - `results` (list of WorkflowToolNestedToolsStepModelInputResultsItem, required)
  - `step_latency_secs` (double, required)

### WorkflowToolNestedToolsStepModelOutputResultsItem

### ConstantSchemaOverrideConstantValue

使用する定数値

### ArrayJsonSchemaPropertyOutput

- `description` (string, optional, default: )
- `dynamic_variable` (string, optional, default: ) — 設定すると、実行時にパラメーター全体へこの動的変数から値が入力されます。description（LLM提供の値）、constant_value、is_omittedとは併用できません。
- `constant_value` (list of any, optional) — 設定すると、実行時に配列全体でこの定数値を使用します。description（LLM提供の配列）、dynamic_variable、is_omittedとは併用できません。
- `is_omitted` (boolean, optional, default: false) — trueの場合、このパラメータはリクエストから完全に省略されます。任意パラメータでのみ有効です。description、dynamic_variable、constant_valueとは併用できません。
- `type` ("array", optional)
- `items` (ArrayJsonSchemaPropertyOutputItems, optional) — 配列要素のスキーマです。

### RequiredConstraint

この制約を満たすためにすべて存在する必要があるフィールドのセット。

- `required` (list of string, required)

### ProcedureVersionRef

- `procedure_id` (string, required) — 手順ID
- `version_id` (string, required) — プロシージャバージョンのID。

### ProcedureDraftRef

- `procedure_id` (string, required) — 手順ID
- `version_id` (any, optional)

### PhoneNumberTransferTransferDestination

- `type`: `phone`
  - `phone_number` (string, required)
- `type`: `phone_dynamic_variable`
  - `phone_number` (string, required)
- `type`: `sip_uri`
  - `sip_uri` (string, required)
- `type`: `sip_uri_dynamic_variable`
  - `sip_uri` (string, required)

### PhoneNumberTransferCustomSipHeadersItem

- `type`: `dynamic`
  - `key` (string, required) — SIPヘッダー名（例：'X-Customer-ID'）
  - `value` (string, required) — 解決する動的変数名
- `type`: `static`
  - `key` (string, required) — SIPヘッダー名（例：'X-Customer-ID'）
  - `value` (string, required) — ヘッダー値

### UuiTransferConfig

SIP REFER転送用のUser-to-User Informationエンベロープ（RFC 7433）。 送信ペイロードは16進数でエンコードされます（RFC 7433で定義されている唯一のエンコード方式です）。 プロトコル識別子の軸により、プラットフォームごとの形式（Talkdesk、Genesysなど）を、分散した転送フラグではなく設定で表現できます。転送モデルを変更せずに、 追加の軸（ASCIIエンコード、ヘッダー名、目的／コンテンツパラメータ）をここに追加できます。

- `data` (string, required) — SIP REFER転送時に送信するUUIペイロード。インライン動的変数をサポートし、転送時に16進数でエンコードされます。
- `protocol_discriminator` (string, optional) — 任意の1オクテットプロトコル識別子（16進数2桁、例：'00'）です。Genesys Cloudなど、指定しない場合にペイロードの先頭オクテットを削除するプラットフォームでは必須です。裸の16進ペイロードを期待するTalkdeskなどのプラットフォームでは設定しないでください。
- `protocol_discriminator_mode` (enum, optional, default: prefix) — protocol\_discriminatorの付加方法です。'prefix'は16進ペイロードの先頭にオクテットを追加します（User-to-User=XX\<hex>;encoding=hex）。'pd\_parameter'は別のパラメーターとして送信します（User-to-User=\<hex>;pd=XX;encoding=hex）。protocol\_discriminatorが未設定の場合は無視されます。
  - Allowed values: `prefix`, `pd_parameter`

### PhoneNumberTransferPostDialDigits

- `type`: `dynamic`
  - `value` (string, required) — 解決する動的変数名
- `type`: `static`
  - `value` (string, required) — 通話接続後に送信するDTMF数字（例：内線番号には'ww1234'）

### WorkflowToolNestedToolsStepModelInputResultsItem

### ArrayJsonSchemaPropertyOutputItems

配列要素のスキーマです。

## Examples

**Request**

```json
{
  "simulation_specification": {
    "simulated_user_config": {
      "first_message": "Hello, how can I help you today?",
      "language": "en",
      "disable_first_message_interruptions": false
    }
  }
}
```

**Response**

```json
{
  "simulated_conversation": [
    {
      "role": "user",
      "time_in_call_secs": 1,
      "agent_metadata": {
        "agent_id": "agent_id"
      },
      "message": "message",
      "multivoice_message": {
        "parts": [
          {
            "text": "text",
            "voice_label": null,
            "time_in_call_secs": null
          }
        ]
      },
      "tool_calls": [
        {
          "request_id": "request_id",
          "tool_name": "tool_name",
          "params_as_json": "params_as_json",
          "tool_has_been_called": true
        }
      ],
      "tool_results": [
        {
          "is_error": true,
          "request_id": "request_id",
          "result_value": "result_value",
          "tool_has_been_called": true,
          "tool_name": "tool_name"
        }
      ],
      "feedback": {
        "score": "like",
        "time_in_call_secs": 1
      },
      "llm_override": "llm_override",
      "producing_llm": "producing_llm",
      "rag_retrieval_info": {
        "chunks": [
          {
            "document_id": "document_id",
            "chunk_id": "chunk_id",
            "vector_distance": 1.1
          }
        ],
        "embedding_model": "e5_mistral_7b_instruct",
        "retrieval_query": "retrieval_query",
        "rag_latency_secs": 1.1
      },
      "interrupted": true,
      "ignored_as_backchannel": true,
      "platform_event": "user_turn_timeout",
      "original_message": "original_message",
      "reasoning": [
        {}
      ],
      "source_medium": "audio",
      "source_event_id": 1,
      "used_static_kb_document_ids": [
        "used_static_kb_document_ids"
      ],
      "user_identifier": "user_identifier",
      "id": "id",
      "triggered_guardrails": [
        {
          "guardrail_type": "custom"
        }
      ],
      "file_input": {
        "file_id": "file_id",
        "original_filename": "original_filename",
        "mime_type": "mime_type",
        "file_url": "file_url"
      },
      "file_inputs": [
        {
          "file_id": "file_id",
          "original_filename": "original_filename",
          "mime_type": "mime_type",
          "file_url": "file_url"
        }
      ],
      "contextual_update_info": {
        "context_id": "context_id"
      },
      "reasoned": true
    }
  ],
  "analysis": {
    "call_successful": "success",
    "transcript_summary": "transcript_summary",
    "evaluation_criteria_results": {
      "key": {
        "criteria_id": "criteria_id",
        "result": "success",
        "rationale": "rationale"
      }
    },
    "data_collection_results": {
      "key": {
        "data_collection_id": "data_collection_id",
        "rationale": "rationale",
        "json_schema": {
          "type": "string",
          "description": "A user-provided message"
        }
      }
    },
    "evaluation_criteria_results_list": [
      {
        "criteria_id": "criteria_id",
        "result": "success",
        "rationale": "rationale"
      }
    ],
    "data_collection_results_list": [
      {
        "data_collection_id": "data_collection_id",
        "rationale": "rationale",
        "json_schema": {
          "type": "string",
          "description": "A user-provided message"
        }
      }
    ],
    "call_success_score": 1.1,
    "call_summary_title": "call_summary_title",
    "scoped": [
      {
        "scope": "conversation",
        "source_agent_id": "source_agent_id",
        "successful": "success"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation"

payload = { "simulation_specification": { "simulated_user_config": {
            "first_message": "Hello, how can I help you today?",
            "language": "en",
            "disable_first_message_interruptions": False
        } } }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"simulation_specification":{"simulated_user_config":{"first_message":"Hello, how can I help you today?","language":"en","disable_first_message_interruptions":false}}}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation"

	payload := strings.NewReader("{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	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/simulate-conversation")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}"

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.post("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation")
  .header("Content-Type", "application/json")
  .body("{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation', [
  'body' => '{
  "simulation_specification": {
    "simulated_user_config": {
      "first_message": "Hello, how can I help you today?",
      "language": "en",
      "disable_first_message_interruptions": false
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"simulation_specification\": {\n    \"simulated_user_config\": {\n      \"first_message\": \"Hello, how can I help you today?\",\n      \"language\": \"en\",\n      \"disable_first_message_interruptions\": false\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["simulation_specification": ["simulated_user_config": [
      "first_message": "Hello, how can I help you today?",
      "language": "en",
      "disable_first_message_interruptions": false
    ]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/simulate-conversation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```