查看原始 JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"connection"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"country": {
"type": "string",
"const": "US",
"default": "US",
"description": "ISO 3166-1 alpha-2 国家代码;第一阶段仅支持 US。"
},
"connection": {
"type": "object",
"required": [
"instructions"
],
"properties": {
"llm": {
"type": "object",
"required": [
"model"
],
"properties": {
"model": {
"type": "string",
"minLength": 1,
"description": "托管 LLM,例如 openai/gpt-4o。"
}
},
"description": "托管助手运行的模型。",
"additionalProperties": false
},
"tts": {
"type": "object",
"required": [
"voiceId"
],
"properties": {
"voiceId": {
"type": "string",
"minLength": 1,
"description": "TTS 声音 ID,来自 /list-voices。"
}
},
"description": "文本转语音的声音选择。",
"additionalProperties": false
},
"name": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"description": "面向用户显示的人格名称,长度 1–120 个字符。"
},
"language": {
"type": "string",
"maxLength": 35,
"minLength": 2,
"description": "BCP-47 语言标签,例如 en 或 es;参见 /list-languages。"
},
"disclosure": {
"type": "string",
"maxLength": 1000,
"description": "启用合规提示时首先播报的 AI/TCPA 通知;留空则使用标准组织名称默认文案。"
},
"callControl": {
"type": "object",
"properties": {
"endCall": {
"type": "boolean",
"description": "是否允许助手挂断电话,默认开启。"
},
"sendDtmf": {
"type": "boolean",
"description": "是否允许助手按下键盘数字以导航 IVR,默认开启。"
}
},
"description": "助手可执行的实时通话操作,仅用于信令。",
"additionalProperties": false
},
"instructions": {
"type": "string",
"maxLength": 10000,
"minLength": 1,
"description": "电话号码 AI 人格的系统提示词,定义通话时的说话方式和行为;必填,每个号码只能有一个连接。"
},
"smsAutoReply": {
"type": "boolean",
"description": "是否使用助手自动回复入站短信,默认关闭。"
},
"complianceEnabled": {
"type": "boolean",
"description": "为 true(默认)时,披露内容作为线路第一段且不可打断的语音播报,并提供 do-not-message 工具。"
}
},
"description": "电话号码的 AI 人格,必填;系统会在内部创建并绑定,可通过 /update-numbers/{id} 更新。",
"additionalProperties": false
},
"phoneNumber": {
"anyOf": [
{
"type": "object",
"properties": {
"areaCode": {
"type": "string",
"pattern": "^\\d{3}$",
"description": "首选的三位数区号,例如 415;仅适用于本地号码,省略则分配任意可用号码。"
},
"numberType": {
"type": "string",
"const": "local",
"default": "local"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"numberType"
],
"properties": {
"numberType": {
"type": "string",
"const": "toll_free"
}
},
"additionalProperties": false
}
],
"default": {
"numberType": "local"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}