编辑 AI 工具箱设置

编辑 AI 工具箱设置。

请求 URL

POST {base_url}/{api_path}/ai_toolbox/update?access_token={access_token}

请求参数

参数 是否必填 类型 说明
enable_tts 否 Integer 是否启用文本转语音 (TTS)。

取值范围:

  • 0:禁用。
  • 1:启用。
llm_provider 否 String 大语言模型 (LLM) 提供商。

取值范围:

  • openai
  • google
  • disable
llm_model 否 String 大语言模型的名称。
注:
llm_api_key 否 String

大语言模型提供商的 API 密钥,使用 Base64 编码。

enable_voicemail_transcription 否 Integer 是否开启语音留言转写。

取值范围:

  • 0:禁用。
  • 1:启用。
voicemail_transcription_language 否 String 语音留言转写使用的语言。
auto_detect_language 否 String 语音留言转写自动检测语言时支持的语言。
voicemail_grant_type 否 String 允许使用语音留言转写的分机范围。

取值范围:

  • all:所有分机。
  • specific:指定分机。
allowed_voicemail_entities 否 Array<Allowed_List> 允许使用语音留言转写的分机列表。
注: 当 voicemail_grant_type 设置为 specific 时,此参数生效。
vm_transcription_type 否 String 语音留言转写服务的类型。

取值范围:

  • built-in:使用内置转写服务。
  • custom:使用自定义转写服务。
vm_transcription_provider 否 String 语音留言转写服务的提供商。
注: 当 vm_transcription_type 设置为 custom 时,此参数生效。

取值范围:

  • aws
  • google
  • openai
  • elevenlabs
vm_transcription_region 否 String 语音留言转写服务所在的服务器区域。

AWS 取值范围:

  • af-south-1
  • ap-east-1
  • ap-northeast-1
  • ap-northeast-2
  • ap-south-1
  • ap-southeast-1
  • ap-southeast-2
  • ca-central-1
  • eu-central-1
  • eu-north-1
  • eu-west-1
  • eu-west-2
  • eu-west-3
  • sa-east-1
  • us-east-1
  • us-east-2
  • us-west-1
  • us-west-2
Google 取值范围:
  • us
  • eu
  • asia-northeast1
  • asia-southeast1
vm_transcription_api_id 否 String 语音留言转写服务的 API ID,使用 Base64 编码。
vm_transcription_api_key 否 String 语音留言转写服务的 API 密钥,使用 Base64 编码。
vm_transcription_api_key_filename 否 String Google 语音留言转写服务凭据文件的名称。
vm_transcription_model 否 String OpenAI 语音留言转写使用的模型。
取值范围:
  • gpt-4o-transcribe
  • gpt-4o-mini-transcribe
  • gpt-4o-mini-transcribe-2025-12-15
  • whisper-1
enable_call_transcription 否 Integer 是否启用通话转写。

取值范围:

  • 0:禁用。
  • 1:启用。
call_transcription_type 否 String 通话转写服务的类型。

取值范围:

  • built-in:使用内置转写服务。
  • custom:使用自定义转写服务。
call_transcription_provider 否 String 通话转写服务的提供商。
注: 当 call_transcription_type 设置为 custom 时,此参数生效。

取值范围:

  • aws
  • google
  • openai
  • elevenlabs
call_transcription_region 否 String 通话转写服务所在的服务器区域。

AWS 取值范围:

  • af-south-1
  • ap-east-1
  • ap-northeast-1
  • ap-northeast-2
  • ap-south-1
  • ap-southeast-1
  • ap-southeast-2
  • ca-central-1
  • eu-central-1
  • eu-north-1
  • eu-west-1
  • eu-west-2
  • eu-west-3
  • sa-east-1
  • us-east-1
  • us-east-2
  • us-west-1
  • us-west-2

Google 取值范围:

  • us
  • eu
  • asia-northeast1
  • asia-southeast1
call_transcription_api_id 否 String 通话转写服务的 API ID,使用 Base64 编码。
call_transcription_api_key 否 String 通话转写服务的 API 密钥,使用 Base64 编码。
call_transcription_api_key_filename 否 String Google 通话转写服务凭据文件的名称。
call_transcription_language 否 String 通话转写使用的语言。
call_transcription_model 否 String 通话转写使用的模型。
取值范围:
  • gpt-4o-transcribe
  • gpt-4o-mini-transcribe
  • gpt-4o-mini-transcribe-2025-12-15
call_transcription_auto_detect_language 否 String 通话转写自动检测语言时支持的语言。
call_grant_type 否 String 允许使用通话转写的分机范围。

取值范围:

  • all:所有分机。
  • specific:指定分机。
allowed_call_entities 否 Array<Allowed_List> 允许使用通话转写的分机列表。
注: 当 call_grant_type 设置为 specific 时,此参数生效。
enable_play_transcription_prompt 否 Integer 是否播放提示音,通知通话双方当前通话正在进行转写。

取值范围:

  • 0:禁用。
  • 1:启用。
transcription_prompt_call_types 否 String 播放转写通知提示音的通话类型。

取值范围:

  • internal:内部通话。
  • outgoing:外呼通话。
  • incoming:来电。
allowed_direct_ext_entities 否 Array<Allowed_List> 启用自动通话转写的分机。分机收到呼入电话时,系统会自动启动通话转写。
allowed_queue_entities 否 Array<Allowed_List> 启用自动通话转写的队列。队列收到呼入电话时,系统会自动启动通话转写。
allowed_ring_group_entities 否 Array<Allowed_List> 启用自动通话转写的响铃组。响铃组收到呼入电话时,系统会自动启动通话转写。
allowed_trunk_entities 否 Array<Allowed_List> 启用自动通话转写的中继。中继收到呼入电话时,系统会自动启动通话转写。
Allowed_List
参数 类型 说明
value String 对象的 ID。
注: 可通过以下接口获取对应的 ID:

响应参数

参数 类型 说明
errcode Integer 返回错误码。
  • 0:请求成功。
  • 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
errmsg String 返回信息。
  • SUCCESS:请求成功。
  • FAILURE:请求失败。

示例

请求示例

POST /openapi/v1.0/ai_toolbox/update?access_token=xVx9wX2B38gSD0C2o4y9b9bd5QOPz2MK HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
    "enable_play_transcription_prompt": 1
}

响应示例

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}