{
  "name": "tms",
  "display_name": "文本内容安全",
  "description": "介绍如何使用API对文本内容检测进行操作，包括识别文本中的不适宜内容等。",
  "domain": "ai",
  "api_version": "2020-12-29",
  "endpoint": "tms.tencentcloudapi.com",
  "actions": [
    {
      "name": "CreateFinancialLLMTask",
      "description": "本接口适用于“金融大模型审校”服务。在对接前，请参考快速入门文档并配置好业务基础信息。 - **快速入门**：[快速入门文档](https://cloud.tencent.com/document/product/1124/124604) ### 接口功能说明： 由于大模型审校服务耗时较长，通常达到分钟级，因此采用异步模式，整体流程分为两步： 1. 创建金融大模型审校任务（详见本文档）。 2. 查询审校结果（详见 [查询结果文档](https://clou...",
      "status": "online",
      "parameters": [
        {
          "name": "BizType",
          "type": "string",
          "required": true,
          "description": "接口使用的识别策略 ID，请参考 [快速指引](https://cloud.tencent.com/document/product/1124/124604) 获取该值。",
          "example": "TencentCloudFinancialLLMDefault"
        },
        {
          "name": "ContentType",
          "type": "integer",
          "required": false,
          "description": "送审内容的格式，有两个可选值： - 1：代表送审内容为**文档**，如DOC文档 - 2：代表送审内容为**纯文本**",
          "example": "1"
        },
        {
          "name": "FileType",
          "type": "string",
          "required": false,
          "description": "若送审内容为文档（ContentType=1），需要传入具体格式，当前支持：DOC、DOCX、PDF。 说明：若送审内容为纯文本（ContentType=2），则本字段传空（FileType=\"\"）。",
          "example": "PDF"
        },
        {
          "name": "Content",
          "type": "string",
          "required": false,
          "description": "送审内容的传入方式如下： - 若为文档类，需传入文档的URL（原文档文字数不超过10,000字），例如：http://xxxxxxxxxxxx/financial_test.doc - 若为纯文本类，请以UTF-8格式进行Base64编码后传入（编码后字符数不超过10,000字），例如：5piO5aSpNjAz5LiA5a6a5rao",
          "example": "5piO5aSpNjAz5LiA5a6a5rao"
        }
      ],
      "required": [
        "BizType"
      ]
    },
    {
      "name": "GetFinancialLLMTaskResult",
      "description": "本接口适用于“金融大模型审校”服务的结果查询。",
      "status": "online",
      "parameters": [
        {
          "name": "TaskId",
          "type": "string",
          "required": true,
          "description": "该值对应创建任务接口里返回的TaskId字段值，创建任务接口见[创建金融大模型审校任务](https://cloud.tencent.com/document/product/1124/124463)。",
          "example": "3570106e-b156-45d9-8af5-99b46f7eb2f9"
        }
      ],
      "required": [
        "TaskId"
      ]
    },
    {
      "name": "TextModeration",
      "description": "本接口提供“内容安全”和“AI生成识别”服务。在对接之前，请先参考快速入门，以配置业务基础信息。 - **内容安全**：[快速入门](https://cloud.tencent.com/document/product/1124/37119) - **AI生成识别**：[快速入门](https://cloud.tencent.com/document/product/1124/118694) ### 接口功能说明： - **内容安全**：对输入的文本，识别其中是否存在色情、违法等风险，返回处置建议、风险标签及对应的模型阈\ufffd...",
      "status": "online",
      "parameters": [
        {
          "name": "Content",
          "type": "string",
          "required": true,
          "description": "待检测的文本内容，需为UTF-8编码并以Base64格式传入。",
          "example": "5L2g55qE5Lil6LCo6K6p5L2g5Y+R546w77yM5Lqn5ZOB57uP55CG5Y+r5YmR6Z2S"
        },
        {
          "name": "BizType",
          "type": "string",
          "required": false,
          "description": "接口使用的识别策略编号，需在[控制台](https://console.cloud.tencent.com/cms/clouds/manage)获取。详细获取方式请参考以下链接： - **内容安全**（详见步骤四：策略配置）：[点击这里](https://cloud.tencent.com/document/product/1124/37119) - **AI生成识别**（详见服务对接-\u003e方式二）：[点击这里](https://cloud.tencent.com/document/product/1124/118694)",
          "example": "TencentCloudDefault"
        },
        {
          "name": "DataId",
          "type": "string",
          "required": false,
          "description": "该字段表示您为待检测文本分配的数据ID，作用是方便您对数据进行标识和管理。 取值：可由英文字母、数字、四种特殊符号（_，-，@，#）组成，**长度不超过64个字符**。",
          "example": "a6127dd-c2a0-43e7-a3da-d27022d39ba7"
        },
        {
          "name": "User",
          "type": "object",
          "required": false,
          "description": "该字段标识用户信息，传入后可增强甄别有违规风险的发布者账号。",
          "example": "无",
          "children": [
            {
              "name": "UserId",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户ID,填写后，系统可根据账号过往违规历史优化审核结果判定，有利于存在可疑违规风险时的辅助判断。 备注：该字段可传入微信openid、QQopenid、字符串等账号信息，与账号类别参数（AccountType）配合使用可确定唯一账号。",
              "example": "user1"
            },
            {
              "name": "Nickname",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户对应的账号昵称信息。",
              "example": "name"
            },
            {
              "name": "AccountType",
              "type": "integer",
              "required": false,
              "description": "该字段表示业务用户ID对应的账号类型，取值：**1**-微信uin，**2**-QQ号，**3**-微信群uin，**4**-qq群号，**5**-微信openid，**6**-QQopenid，**7**-其它string。 该字段与账号ID参数（UserId）配合使用可确定唯一账号。",
              "example": "172300"
            },
            {
              "name": "Gender",
              "type": "integer",
              "required": false,
              "description": "该字段表示业务用户对应账号的性别信息。 取值：**0**（默认值，代表性别未知）、**1**（男性）、**2**（女性）。",
              "example": "1"
            },
            {
              "name": "Age",
              "type": "integer",
              "required": false,
              "description": "该字段表示业务用户对应账号的年龄信息。 取值：**0**（默认值，代表年龄未知）-（**自定义年龄上限**）之间的整数。",
              "example": "16"
            },
            {
              "name": "Level",
              "type": "integer",
              "required": false,
              "description": "该字段表示业务用户对应账号的等级信息。 取值：**0**（默认值，代表等级未知）、**1**（等级较低）、**2**（等级中等）、**3**（等级较高），目前**暂不支持自定义等级**。",
              "example": "1"
            },
            {
              "name": "Phone",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户对应账号的手机号信息，支持全球各地区手机号的记录。 备注：请保持手机号格式的统一，如区号格式（086/+86）等。",
              "example": "176****2131"
            },
            {
              "name": "HeadUrl",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户头像图片的访问链接(URL)，支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。 备注：头像图片大小不超过5MB，建议分辨率不低于256x256；图片下载时间限制为3秒，超过则会返回下载超时。",
              "example": "https://cmstest-123.cos.ap-guangzhou.myqcloud.com/image.jpg"
            },
            {
              "name": "Desc",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户的简介信息，支持汉字、英文及特殊符号，长度不超过5000个汉字字符。",
              "example": "Desc01"
            },
            {
              "name": "RoomId",
              "type": "string",
              "required": false,
              "description": "该字段表示业务群聊场景时的房间ID。",
              "example": "roomid_1"
            },
            {
              "name": "ReceiverId",
              "type": "string",
              "required": false,
              "description": "该字段表示消息接受者ID",
              "example": "user_1"
            },
            {
              "name": "SendTime",
              "type": "integer",
              "required": false,
              "description": "消息生成时间，精确到毫秒",
              "example": "2025-05-15 14:41:27"
            }
          ]
        },
        {
          "name": "Device",
          "type": "object",
          "required": false,
          "description": "该字段标识设备信息，传入后可增强甄别有违规风险的发布者设备。",
          "example": "无",
          "children": [
            {
              "name": "IP",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户对应设备的IP地址。 备注:目前仅支持IPv4地址记录，不支持IPv6地址记录。",
              "example": "10.10.11.11"
            },
            {
              "name": "Mac",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户对应的MAC地址，以方便设备识别与管理；其格式与取值与标准MAC地址一致。",
              "example": "01:xx:xx:xx:xx:xx"
            },
            {
              "name": "TokenId",
              "type": "string",
              "required": false,
              "description": "*内测中，敬请期待。*",
              "example": "token"
            },
            {
              "name": "DeviceId",
              "type": "string",
              "required": false,
              "description": "*内测中，敬请期待。*",
              "example": "Device_Id"
            },
            {
              "name": "IMEI",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户对应设备的**IMEI码**（国际移动设备识别码），该识别码可用于识别每一部独立的手机等移动通信设备，方便设备识别与管理。备注：格式为**15-17位纯数字**。",
              "example": "490154203237518"
            },
            {
              "name": "IDFA",
              "type": "string",
              "required": false,
              "description": "**iOS设备专用**，该字段表示业务用户对应的**IDFA**(广告标识符),这是由苹果公司提供的用于标识用户的广告标识符，由一串16进制的32位数字和字母组成。 备注：苹果公司自2021年iOS14更新后允许用户手动关闭或者开启IDFA，故此字符串标记有效性可能有所降低。",
              "example": "3D4D-510F-DE8A-FA9E-BC8A-1C1E-3422-2E76"
            },
            {
              "name": "IDFV",
              "type": "string",
              "required": false,
              "description": "**iOS设备专用**，该字段表示业务用户对应的**IDFV**(应用开发商标识符),这是由苹果公司提供的用于标注应用开发商的标识符，由一串16进制的32位数字和字母组成，可被用于唯一标识设备。",
              "example": "5A3C-0DD9-DE8A-FA9E-BC8A-1C1E-3422-2E76"
            }
          ]
        },
        {
          "name": "SourceLanguage",
          "type": "string",
          "required": false,
          "description": "Content字段的原始语种，枚举值包括 zh 和 en： - 推荐使用 zh - en 适用于纯英文内容，耗时较高。若需使用 en，请先通过[反馈工单](https://console.cloud.tencent.com/workorder/category?level1_id=141\u0026level2_id=1287\u0026source=14\u0026data_title=%E6%96%87%E6%9C%AC%E5%86%85%E5%AE%B9%E5%AE%89%E5%85%A8\u0026step=1)确认",
          "example": "zh"
        },
        {
          "name": "Type",
          "type": "string",
          "required": false,
          "description": "服务类型，枚举值包括 TEXT 和 TEXT_AIGC： TEXT：内容安全 TEXT_AIGC：AI生成识别",
          "example": "TEXT"
        },
        {
          "name": "SessionId",
          "type": "string",
          "required": false,
          "description": "适用于上下文关联审核场景，若多条文本内容需要联合审核，通过该字段关联会话。",
          "example": "7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b"
        }
      ],
      "required": [
        "Content"
      ]
    }
  ]
}