{
  "name": "ams",
  "display_name": "音频内容安全",
  "description": "介绍如何使用API对音频内容检测进行操作，包括识别音频中的不适宜内容等。",
  "domain": "other",
  "api_version": "2020-12-29",
  "endpoint": "ams.tencentcloudapi.com",
  "actions": [
    {
      "name": "CancelTask",
      "description": "可使用该接口取消审核任务。请求成功后，接口返回RequestId则说明取消成功。默认接口请求频率限制：**20次/秒**。",
      "status": "online",
      "parameters": [
        {
          "name": "TaskId",
          "type": "string",
          "required": true,
          "description": "该字段表示创建音频审核任务后返回的任务ID（在Results参数中），用于标识需要取消的审核任务。",
          "example": "task-audio-XwxJtbkKXWgCt8AZ"
        }
      ],
      "required": [
        "TaskId"
      ]
    },
    {
      "name": "CreateAudioModerationSyncTask",
      "description": "本接口（CreateAudioModerationSyncTask） 用于提交短音频内容进行智能审核任务，使用前请您使用腾讯云主账号登录控制台 [开通音频内容安全服务](https://console.cloud.tencent.com/cms/audio/package) 并调整好对应的业务配置。 ### 接口使用说明： - 前往“[内容安全控制台-图片内容安全](https://console.cloud.tencent.com/cms/audio/package)”开启使用音频内容安全服务，首次开通服务的用户可免费领用试用\ufffd...",
      "status": "online",
      "parameters": [
        {
          "name": "BizType",
          "type": "string",
          "required": true,
          "description": "Biztype为策略的具体的编号，用于接口调度，在内容安全控制台中可配置。不同Biztype关联不同的业务场景与识别能力策略，调用前请确认正确的Biztype。Biztype仅为数字、字母与下划线的组合，长度为3-32个字符；调用时不传入Biztype代表采用默认的识别策略。",
          "example": "audio_test_0001"
        },
        {
          "name": "DataId",
          "type": "string",
          "required": true,
          "description": "数据标识，可以由英文字母、数字、下划线、-、@#组成，不超过64个字符",
          "example": "5c10e038-35ff-4114-88ab-53a0aaea5dd7"
        },
        {
          "name": "FileFormat",
          "type": "string",
          "required": true,
          "description": "音频文件资源格式，当前支持格式：wav、mp3、m4a，请按照实际文件格式填入。",
          "example": "mp3"
        },
        {
          "name": "Name",
          "type": "string",
          "required": false,
          "description": "文件名称，可以由英文字母、数字、下划线、-、@#组成，不超过64个字符",
          "example": "file_name"
        },
        {
          "name": "FileContent",
          "type": "string",
          "required": false,
          "description": "数据Base64编码，短音频同步接口仅传入可音频内容； 支持范围：文件大小不能超过5M，时长不可超过60s； 支持格式：wav (PCM编码)、mp3、m4a (采样率：16kHz~48kHz，位深：16bit 小端，声道数：单声道/双声道，建议格式：16kHz/16bit/单声道)。",
          "example": "1"
        },
        {
          "name": "FileUrl",
          "type": "string",
          "required": false,
          "description": "音频资源访问链接，与FileContent参数必须二选一输入； 支持范围及格式：同FileContent；",
          "example": "1"
        }
      ],
      "required": [
        "BizType",
        "DataId",
        "FileFormat"
      ]
    },
    {
      "name": "CreateAudioModerationTask",
      "description": "本接口（Audio Moderation）用于提交音频内容（包括音频文件或流地址）进行智能审核任务，使用前请您使用腾讯云主账号登录控制台[开通音频内容安全服务](https://console.cloud.tencent.com/cms)并调整好对应的业务配置。 ### 功能使用说明： - 前往“[内容安全控制台-音频内容安全](https://console.cloud.tencent.com/cms)”开启使用音频内容安全服务，首次开通可获得**10小时**免费调用时长，有效...",
      "status": "online",
      "parameters": [
        {
          "name": "Tasks",
          "type": "array",
          "required": true,
          "description": "该字段表示输入的音频审核任务信息，具体输入内容请参见TaskInput数据结构的详细描述。 备注：最多同时可创建**10个任务**。",
          "example": "无",
          "item_type": "object",
          "children": [
            {
              "name": "DataId",
              "type": "string",
              "required": false,
              "description": "选填参数，该字段表示您为待检测对象分配的数据ID，传入后可方便您对文件进行标识和管理。取值：由英文字母（大小写均可）、数字及四个特殊符号（_，-，@，#）组成，**长度不超过64个字符**。",
              "example": "a61237dd-c2a0-43e7-a3da-d27022d39ba7"
            },
            {
              "name": "Name",
              "type": "string",
              "required": false,
              "description": "选填参数，该字段表示音频审核任务所对应的任务名称，方便后续查询和管理审核任务。",
              "example": "cmsop"
            },
            {
              "name": "Input",
              "type": "object",
              "required": false,
              "description": "必填参数，该字段表示审核文件的访问参数，用于获取审核媒体文件，该参数内包括访问类型和访问地址。",
              "example": "无",
              "children": [
                {
                  "name": "Type",
                  "type": "string",
                  "required": false,
                  "description": "该字段表示文件访问类型，取值为**URL**（资源链接）和**COS** (腾讯云对象存储)；该字段应当与传入的访问类型相对应，可用于强校验并方便系统快速识别访问地址；若不传入此参数，则默认值为URL，此时系统将自动判定访问地址类型。",
                  "example": "URL"
                },
                {
                  "name": "Url",
                  "type": "string",
                  "required": false,
                  "description": "该字段表示文件访问的链接地址，格式为标准URL格式。 备注：当Type为URL时此字段不为空，该参数与BucketInfo参数须传入其中之一",
                  "example": "https://cmstest-123.cos.ap-guangzhou.myqcloud.com/audio.mp3"
                },
                {
                  "name": "BucketInfo",
                  "type": "object",
                  "required": false,
                  "description": "该字段表示文件访问的腾讯云存储桶信息。 备注：当Type为COS时此字段不为空，该参数与Url参数须传入其中之一。",
                  "example": "无",
                  "children": [
                    {
                      "name": "Bucket",
                      "type": "string",
                      "required": true,
                      "description": "该字段用于标识腾讯云对象存储的存储桶名称,关于文件桶的详细信息敬请参考 [腾讯云存储相关说明](https://cloud.tencent.com/document/product/436/44352)。",
                      "example": "cmsop-appid"
                    },
                    {
                      "name": "Region",
                      "type": "string",
                      "required": true,
                      "description": "该字段用于标识腾讯云对象存储的托管机房的分布地区，对象存储 COS 的数据存放在这些地域的存储桶中。",
                      "example": "ap-guangzhou"
                    },
                    {
                      "name": "Object",
                      "type": "string",
                      "required": true,
                      "description": "该字段用于标识腾讯云对象存储的对象Key,对象作为基本单元被存放在存储桶中；用户可以通过腾讯云控制台、API、SDK 等多种方式管理对象。有关对象的详细描述敬请参阅相应 [产品文档](https://cloud.tencent.com/document/product/436/13324)。",
                      "example": "/audioDate/20240101/cmsop-audio.mp3"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name": "BizType",
          "type": "string",
          "required": false,
          "description": "该字段表示使用的策略的具体编号，该字段需要先在[内容安全控制台](https://console.cloud.tencent.com/cms/clouds/manage)中配置。 备注：不同Biztype关联不同的业务场景与识别能力策略，调用前请确认正确的Biztype。",
          "example": "default"
        },
        {
          "name": "Type",
          "type": "string",
          "required": false,
          "description": "该字段表示输入的音频审核类型，取值含：**AUDIO**（点播音频）、**LIVE_AUDIO**（直播音频）、**AUDIO_AIGC**（AI生成识别）三种，默认值为AUDIO。",
          "example": "AUDIO"
        },
        {
          "name": "Seed",
          "type": "string",
          "required": false,
          "description": "可选参数，该字段表示回调签名的key信息，用于保证数据的安全性。 签名方法为在返回的HTTP头部添加 X-Signature 的字段，值为： seed + body 的 SHA256 编码和Hex字符串，在收到回调数据后，可以根据返回的body，用 **sha256(seed + body)**, 计算出 `X-Signature` 进行验证。具体使用实例可参考 [回调签名示例](https://cloud.tencent.com/document/product/1219/104000#42dd87d2-580f-46cf-a953-639a787d1eda)。",
          "example": "askseed"
        },
        {
          "name": "CallbackUrl",
          "type": "string",
          "required": false,
          "description": "接收审核信息回调地址。如果设置了该字段，在审核过程中发现违规音频片段结果将发送至该接口。更多详情请参阅[回调配置说明](https://cloud.tencent.com/document/product/1219/104000)。",
          "example": "https://example.com/url"
        },
        {
          "name": "User",
          "type": "object",
          "required": false,
          "description": "该字段表示待检测对象对应的用户相关信息，若填入则可甄别相应违规风险用户",
          "example": "无",
          "children": [
            {
              "name": "Level",
              "type": "integer",
              "required": false,
              "description": "用户等级，默认0 未知 1 低 2 中 3 高",
              "example": "1"
            },
            {
              "name": "Gender",
              "type": "integer",
              "required": false,
              "description": "性别 默认0 未知 1 男性 2 女性",
              "example": "1"
            },
            {
              "name": "Age",
              "type": "integer",
              "required": false,
              "description": "年龄 默认0 未知",
              "example": "16"
            },
            {
              "name": "UserId",
              "type": "string",
              "required": false,
              "description": "业务用户ID 如填写，会根据账号历史恶意情况，判定消息有害结果，特别是有利于可疑恶意情况下的辅助判断。账号可以填写微信uin、QQ号、微信openid、QQopenid、字符串等。该字段和账号类别确定唯一账号。",
              "example": "user1"
            },
            {
              "name": "Phone",
              "type": "string",
              "required": false,
              "description": "手机号",
              "example": "176****2131"
            },
            {
              "name": "AccountType",
              "type": "string",
              "required": false,
              "description": "业务用户ID类型 \"1-微信uin 2-QQ号 3-微信群uin 4-qq群号 5-微信openid 6-QQopenid 7-其它string\"",
              "example": "1-微信uin"
            },
            {
              "name": "Nickname",
              "type": "string",
              "required": false,
              "description": "用户昵称",
              "example": "name"
            },
            {
              "name": "HeadUrl",
              "type": "string",
              "required": false,
              "description": "用户头像图片链接",
              "example": "https://cmstest-123.cos.ap-guangzhou.myqcloud.com/image.jpg"
            },
            {
              "name": "Desc",
              "type": "string",
              "required": false,
              "description": "用户简介，长度不超过5000字",
              "example": "Desc_1"
            },
            {
              "name": "RoomId",
              "type": "string",
              "required": false,
              "description": "群聊场景房间ID",
              "example": "roomid_1"
            },
            {
              "name": "GroupId",
              "type": "string",
              "required": false,
              "description": "群聊场景群ID",
              "example": "groupid_1"
            },
            {
              "name": "GroupSize",
              "type": "integer",
              "required": false,
              "description": "群聊场景群用户数",
              "example": "1"
            },
            {
              "name": "ReceiverId",
              "type": "string",
              "required": false,
              "description": "消息接收者ID",
              "example": "userid_1"
            },
            {
              "name": "SendTime",
              "type": "string",
              "required": false,
              "description": "消息生成时间，毫秒",
              "example": "2025-05-15 15:40:06"
            }
          ]
        }
      ],
      "required": [
        "Tasks"
      ]
    },
    {
      "name": "DescribeTaskDetail",
      "description": "通过该接口可查看音频审核任务的详情信息，包括任务状态、检测结果、音频文件识别出的对应文本内容、检测结果所对应的恶意标签及推荐的后续操作等，具体输出内容可查看输出参数示例。",
      "status": "online",
      "parameters": [
        {
          "name": "TaskId",
          "type": "string",
          "required": true,
          "description": "该字段表示创建音频审核任务后返回的任务ID（在Results参数中），用于标识需要查询任务详情的审核任务。 备注：查询接口单次最大查询量为**20条每次**。",
          "example": "w-audio-YBJzazmYs4vO27p2"
        },
        {
          "name": "ShowAllSegments",
          "type": "boolean",
          "required": false,
          "description": "该布尔字段表示是否展示全部的音频片段，取值：True(展示全部的音频分片)、False(只展示命中审核规则的音频分片)；默认值为False。",
          "example": "false"
        }
      ],
      "required": [
        "TaskId"
      ]
    },
    {
      "name": "DescribeTasks",
      "description": "通过该接口可查看审核任务列表；您也可根据多种业务信息（业务类型、审核结果、任务状态等）筛选审核任务列表。任务列表输出内容包括当前查询的任务总量、任务名称、任务状态、音频审核类型、基于检测结果的恶意标签及其后续操作等，具体输出内容可查看输出参数示例。默认接口请求频率限制：**20次/秒**。",
      "status": "online",
      "parameters": [
        {
          "name": "Limit",
          "type": "integer",
          "required": false,
          "description": "该参数表示任务列表每页展示的任务条数，**默认值为10**（每页展示10条任务）。",
          "example": "10"
        },
        {
          "name": "Filter",
          "type": "object",
          "required": false,
          "description": "该参数表示任务筛选器的输入参数，可根据业务类型、审核文件类型、处理建议及任务状态筛选想要查看的审核任务，具体参数内容请参见TaskFilter数据结构的详细描述。",
          "example": "无",
          "children": [
            {
              "name": "BizType",
              "type": "string",
              "required": false,
              "description": "该字段用于传入任务对应的业务类型供筛选器进行筛选。Biztype为策略的具体的编号，用于接口调度，在内容安全控制台中可配置。不同Biztype关联不同的业务场景与审核策略，调用前请确认正确的Biztype。Biztype仅为**数字、字母与下划线的组合**，长度为3-32个字符。备注：在不传入该参数时筛选器默认不筛选业务类型。",
              "example": "default"
            },
            {
              "name": "Type",
              "type": "string",
              "required": false,
              "description": "该字段用于传入音频审核对应的任务类型供筛选器进行筛选，取值为：**VIDEO**（点播视频审核），**AUDIO**（点播音频审核）， **LIVE_VIDEO**（直播视频审核）, **LIVE_AUDIO**（直播音频审核）。备注：在不传入该参数时筛选器默认不筛选任务类型。",
              "example": "VIDEO"
            },
            {
              "name": "Suggestion",
              "type": "string",
              "required": false,
              "description": "该字段用于传入音频审核对应的建议操作供筛选器进行筛选，取值为：**Block**：建议屏蔽，**Review**：建议人工复审，**Pass**：建议通过。备注：在不传入该参数时筛选器默认不筛选建议操作。",
              "example": "Review"
            },
            {
              "name": "TaskStatus",
              "type": "string",
              "required": false,
              "description": "该字段用于传入审核任务的任务状态供筛选器进行筛选，取值为：**FINISH**（任务已完成）、**PENDING** （任务等待中）、**RUNNING** （任务进行中）、**ERROR** （任务出错）、**CANCELLED** （任务已取消）。备注：在不传入该参数时筛选器默认不筛选任务状态。",
              "example": "RUNNING"
            }
          ]
        },
        {
          "name": "PageToken",
          "type": "string",
          "required": false,
          "description": "该参数表示翻页时使用的Token信息，由系统自动生成，并在翻页时向下一个生成的页面传递此参数，以方便快速翻页功能的实现。当到最后一页时，该字段为空。",
          "example": ".aCQX6qOnIv0SuMLH"
        },
        {
          "name": "StartTime",
          "type": "string",
          "required": false,
          "description": "该参数表示任务列表的开始时间，格式为ISO8601标准的时间戳。**默认值为最近3天**，若传入该参数，则在这一时间到EndTime之间的任务将会被筛选出来。备注：该参数与Filter共同起到任务筛选作用，二者作用无先后顺序。",
          "example": "2025-05-12T00:00:00+08:00"
        },
        {
          "name": "EndTime",
          "type": "string",
          "required": false,
          "description": "该参数表示任务列表的结束时间，格式为ISO8601标准的时间戳。**默认值为空**，若传入该参数，则在这StartTime到这一时间之间的任务将会被筛选出来。备注：该参数与Filter共同起到任务筛选作用，二者作用无先后顺序。",
          "example": "2025-05-13T23:59:59+08:00"
        }
      ],
      "required": []
    }
  ]
}