{
  "name": "ims",
  "display_name": "图片内容安全",
  "description": "介绍如何使用API对图片内容安全进行操作，包括识别图片中的不适宜内容等。",
  "domain": "other",
  "api_version": "2020-12-29",
  "endpoint": "ims.tencentcloudapi.com",
  "actions": [
    {
      "name": "CreateImageModerationAsyncTask",
      "description": "本接口用于提交图片文件进行异步智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通图片内容安全服务](https://console.cloud.tencent.com/cms/image/package) 并调整好对应的业务配置。 ### 接口使用说明： - 前往“[内容安全控制台-图片内容安全](https://console.cloud.tencent.com/cms/image/package)”开启使用图片内容安全服务，首次开通服务的用户可免费领用试用套餐包，包含**3000张图片*...",
      "status": "online",
      "parameters": [
        {
          "name": "CallbackUrl",
          "type": "string",
          "required": true,
          "description": "接收审核信息回调地址，审核过程中产生的所有结果发送至此地址。",
          "example": "http://example.com"
        },
        {
          "name": "BizType",
          "type": "string",
          "required": false,
          "description": "该字段表示策略的具体编号，用于接口调度，在内容安全控制台中可配置。若不传入Biztype参数（留空），则代表采用默认的识别策略；传入则会在审核时根据业务场景采取不同的审核策略。备注：Biztype仅为数字、字母与下划线的组合，长度为3-32个字符；不同Biztype关联不同的业务场景与识别能力策略，调用前请确认正确的Biztype。",
          "example": "test_1001"
        },
        {
          "name": "DataId",
          "type": "string",
          "required": false,
          "description": "该字段表示您为待检测对象分配的数据ID，传入后可方便您对文件进行标识和管理。取值：由英文字母（大小写均可）、数字及四个特殊符号（_，-，@，#）组成，长度不超过64个字符。",
          "example": "1213"
        },
        {
          "name": "FileContent",
          "type": "string",
          "required": false,
          "description": "该字段表示待检测图片文件内容的Base64编码，图片大小不超过10MB，建议分辨率不低于256x256，否则可能会影响识别效果。备注： 该字段与FileUrl必须选择输入其中一个。",
          "example": "aHR0cDovL2lubmVycG9ybnNjcmVlbnNob3QtMTI1MjgxMzg1MC5jb3MuYXAtZ3Vh"
        },
        {
          "name": "FileUrl",
          "type": "string",
          "required": false,
          "description": "该字段表示待检测图片文件的访问链接，图片支持PNG、JPG、JPEG、BMP、GIF、WEBP格式，大小不超过100MB，建议分辨率不低于256x256；图片下载时间限制为3秒，超过则会返回下载超时；由于网络安全策略，送审带重定向的链接，可能引起下载失败，请尽量避免，比如Http返回302状态码的链接，可能导致接口返回ResourceUnavailable.ImageDownloadError。备注：该字段与FileContent必须选择输入其中一...",
          "example": "https://xxx.jpg"
        },
        {
          "name": "Interval",
          "type": "integer",
          "required": false,
          "description": "GIF/长图检测专用，用于表示GIF截帧频率（每隔多少张图片抽取一帧进行检测），长图则按照长边：短边取整计算要切割的总图数；默认值为0，此时只会检测GIF的第一帧或对长图不进行切分处理。备注：Interval与MaxFrames参数需要组合使用。例如，Interval=3, MaxFrames=400，则代表在检测GIF/长图时，将每间隔2帧检测一次且最多检测400帧。",
          "example": "1"
        },
        {
          "name": "MaxFrames",
          "type": "integer",
          "required": false,
          "description": "GIF/长图检测专用，用于标识最大截帧数量；默认值为1，此时只会检测输入GIF的第一帧或对长图不进行切分处理（可能会造成处理超时）。备注：Interval与MaxFrames参数需要组合使用。例如，Interval=3, MaxFrames=400，则代表在检测GIF/长图时，将每间隔2帧检测一次且最多检测400帧。",
          "example": "1"
        },
        {
          "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": "string",
              "required": false,
              "description": "该字段表示业务用户ID对应的账号类型，取值：**1**-微信uin，**2**-QQ号，**3**-微信群uin，**4**-qq群号，**5**-微信openid，**6**-QQopenid，**7**-其它string。 该字段与账号ID参数（UserId）配合使用可确定唯一账号。",
              "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": "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": "Desc",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户的简介信息，支持汉字、英文及特殊符号，**长度不超过5000个汉字字符**。",
              "example": "Desc01"
            },
            {
              "name": "HeadUrl",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户头像图片的访问链接(URL)，支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。备注：头像图片**大小不超过5MB**，建议**分辨率不低于256x256**；图片下载时间限制为3秒，超过则会返回下载超时。",
              "example": "https://cmstest.cos.ap-guangzhou.myqcloud.com/image.jpg"
            }
          ]
        },
        {
          "name": "Device",
          "type": "object",
          "required": false,
          "description": "该字段表示待检测对象对应的设备相关信息，若填入则可甄别相应违规风险设备。",
          "example": "无",
          "children": [
            {
              "name": "Ip",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户对应设备的IP地址，同时**支持IPv4和IPv6**地址的记录；需要与IpType参数配合使用。",
              "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": "IpType",
              "type": "integer",
              "required": false,
              "description": "该字段表示记录的IP地址的类型，取值：**0**（代表IPv4地址）、**1**（代表IPv6地址）；需要与IpType参数配合使用。",
              "example": "1"
            }
          ]
        },
        {
          "name": "Type",
          "type": "string",
          "required": false,
          "description": "服务类型，可为空，默认为 IMAGE。枚举值：IMAGE： 一般图片异步检测IMAGE_LLM： 大模型图片异步检测",
          "example": "IMAGE"
        }
      ],
      "required": [
        "CallbackUrl"
      ]
    },
    {
      "name": "ImageModeration",
      "description": "本接口（Image Moderation, IM）用于提交图片文件进行同步智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通图片内容安全服务](https://console.cloud.tencent.com/cms) 并调整好对应的业务配置。 ### 接口使用说明： - 前往“[内容安全控制台-图片内容安全](https://console.cloud.tencent.com/cms)”开启使用图片内容安全服务，首次开通服务的用户可免费领用试用套餐包，包含**3000张图片**\ufffd...",
      "status": "online",
      "parameters": [
        {
          "name": "BizType",
          "type": "string",
          "required": false,
          "description": "该字段表示使用的策略的具体编号，该字段需要先在[内容安全控制台](https://console.cloud.tencent.com/cms/clouds/manage)中配置。 备注：不同Biztype关联不同的业务场景与识别能力策略，调用前请确认正确的Biztype。",
          "example": "TencentCloudDefault"
        },
        {
          "name": "DataId",
          "type": "string",
          "required": false,
          "description": "该字段表示您为待检测对象分配的数据ID，传入后可方便您对文件进行标识和管理。取值：由英文字母（大小写均可）、数字及四个特殊符号（_，-，@，#）组成，**长度不超过64个字符**。",
          "example": "a61237dd-c2a0-43e7-a3da-d27022d39ba7"
        },
        {
          "name": "FileContent",
          "type": "string",
          "required": false,
          "description": "该字段表示待检测图片文件内容的Base64编码，由于云API对请求包体有大小限制，图片的**Base64编码内容大小不得超过10MB**。备注：**该字段与FileUrl必须选择输入其中一个**。",
          "example": "aHR0cDovL2lubmVycG9ybnNjcmVlbnNob3QtMTI1MjgxMzg1MC5jb3MuYXAtZ3Vh"
        },
        {
          "name": "FileUrl",
          "type": "string",
          "required": false,
          "description": "该字段表示待检测图片文件的访问链接，URL源图**大小不超过30MB**。备注：该字段与FileContent必须选择输入其中一个。",
          "example": "https://cmstest-123.cos.ap-guangzhou.myqcloud.com/image.jpg"
        },
        {
          "name": "Interval",
          "type": "integer",
          "required": false,
          "description": "**GIF检测专用**，用于表示GIF截帧频率（每隔多少张图片抽取一帧进行检测）；默认值为0，此时只会检测GIF的第一帧或不进行切分处理。备注：Interval与MaxFrames参数需要组合使用。例如，Interval=3, MaxFrames=400，则代表在检测GIF时，将每间隔2帧检测一次且最多检测400帧。",
          "example": "0"
        },
        {
          "name": "MaxFrames",
          "type": "integer",
          "required": false,
          "description": "**GIF检测专用**，用于标识最大截帧数量；默认值为1，此时只会检测输入GIF的第一帧不进行切分处理（可能会造成处理超时）。备注：Interval与MaxFrames参数需要组合使用。例如，Interval=3, MaxFrames=400，则代表在检测GIF时，将每间隔2帧检测一次且最多检测400帧。",
          "example": "5"
        },
        {
          "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": "string",
              "required": false,
              "description": "该字段表示业务用户ID对应的账号类型，取值：**1**-微信uin，**2**-QQ号，**3**-微信群uin，**4**-qq群号，**5**-微信openid，**6**-QQopenid，**7**-其它string。 该字段与账号ID参数（UserId）配合使用可确定唯一账号。",
              "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": "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": "Desc",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户的简介信息，支持汉字、英文及特殊符号，**长度不超过5000个汉字字符**。",
              "example": "Desc01"
            },
            {
              "name": "HeadUrl",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户头像图片的访问链接(URL)，支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。备注：头像图片**大小不超过5MB**，建议**分辨率不低于256x256**；图片下载时间限制为3秒，超过则会返回下载超时。",
              "example": "https://cmstest.cos.ap-guangzhou.myqcloud.com/image.jpg"
            }
          ]
        },
        {
          "name": "Device",
          "type": "object",
          "required": false,
          "description": "该字段表示待检测对象对应的设备相关信息，若填入则可甄别相应违规风险设备。",
          "example": "无",
          "children": [
            {
              "name": "Ip",
              "type": "string",
              "required": false,
              "description": "该字段表示业务用户对应设备的IP地址，同时**支持IPv4和IPv6**地址的记录；需要与IpType参数配合使用。",
              "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": "IpType",
              "type": "integer",
              "required": false,
              "description": "该字段表示记录的IP地址的类型，取值：**0**（代表IPv4地址）、**1**（代表IPv6地址）；需要与IpType参数配合使用。",
              "example": "1"
            }
          ]
        },
        {
          "name": "Type",
          "type": "string",
          "required": false,
          "description": "该字段表示输入的图片审核类型，取值含：IMAGE（内容安全）、IMAGE_AIGC（AI生成识别）两种，默认值为IMAGE。",
          "example": "IMAGE_AIGC"
        }
      ],
      "required": []
    }
  ]
}