{
  "openapi": "3.0.3",
  "info": {
    "title": "AI文本图片安全审核",
    "description": "基于人工智能的安全审核功能，对文本和图片进行检测和审核，自动分析和识别潜在的不安全、违规、或有害的内容，进行全面的分析和评估。对于文本内容，可检测和过滤敏感词汇、恶意言论、色情内容等。对于图片内容，可识别和过滤含有暴力、色情、恶心等不合规的图像。以此确保用户生成内容符合相关的法律法规和社区准则。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/1755-5": {
      "x-pointCode": 5,
      "x-mode": "mapping",
      "x-read-timeout": 35,
      "x-connect-timeout": 35,
      "post": {
        "summary": "文本审核-V3",
        "description": "对返回结构做了优化，检测更精准。识别过滤文本中的垃圾内容，规避色情、广告、灌水、渉政、辱骂等内容风险。\n内容要求：不超过10000个字节（约等于3333个汉字）",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "result": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "confidence_level": {
                                    "type": "number",
                                    "description": "结果为该分类的概率，取值范围为[0.00-100.00]。值越高，表示越有可能属于该分类"
                                  },
                                  "label": {
                                    "type": "string",
                                    "description": "当前检测内容：\nnormal：正常\nflood：灌水\nterrorism：暴恐 \nporn：色情\npolitics：涉政 \nabuse：辱骂 \nad：广告\ncontraband：涉嫌违法"
                                  },
                                  "words": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "违禁词，只有违规时并且提取了才会存在"
                                  }
                                }
                              },
                              "description": "检测结果"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "\t\n0 成功\n10 文件下载失败\n20 图片解析失败\n30 OCR识别失败\n40 参数错误\n50 文件内容过大\n60 文件格式错误\n70 操作失败,请勿重复提交\n80 服务超时\n90 未知错误，请联系客服处理"
                            },
                            "remark": {
                              "type": "string",
                              "description": "调用说明"
                            },
                            "sug": {
                              "type": "string",
                              "description": "建议用户执行的操作，取值范围： \npass：文本正常 \nreview：需要人工审核 \nblock：文本违规，可以直接删除或者做限制处理"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1755_5_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "description": "需要检测的内容（不超过10000个字节，约等于3333个汉字）"
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        }
      }
    },
    "/1755-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 35,
      "x-connect-timeout": 35,
      "post": {
        "summary": "图片审核-V2",
        "description": "规避图片中存在敏感人物照片、敏感事件等内容风险。\n图片要求：小于4M\n像素要求：短边像素大于256\n格式支持：PNG、JPG、JPEG、BMP",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0 成功\n10 文件下载失败\n20 图片解析失败\n30 OCR识别失败\n40 参数错误\n50 文件内容过大\n60 文件格式错误\n70 操作失败,请勿重复提交\n80 服务超时\n90 未知错误"
                            },
                            "results": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "confidence_level": {
                                    "type": "number",
                                    "description": "结果为该分类的概率，取值范围为[0.00-100.00]。值越高，表示越有可能属于该分类"
                                  },
                                  "label": {
                                    "type": "string",
                                    "description": "当前检测内容：\nnormal\t正常\nporn\t色情识别\nterrorism\t暴恐识别\npolitics\t涉政识别\nlive\t不良场景识别（包括：违禁药品，性暗示，纹身，酒精，赌博，恐怖或以上疑似场景）"
                                  }
                                }
                              },
                              "description": "检测结果"
                            },
                            "sug": {
                              "type": "string",
                              "description": "建议用户执行的操作，取值范围： \npass：文本正常 \nreview：需要人工审核 \nblock：文本违规，可以直接删除或者做限制处理"
                            },
                            "confidence_level": {
                              "type": "number",
                              "description": "置信度，取值范围为[0.00-100.00]。值越高，表示越有可能违规"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1755_4_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_url": {
                    "type": "string",
                    "description": "图片url\n格式要求：PNG、JPG、JPEG、BMP\nimg_base64和img_url 二选一"
                  },
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "图片base64字符串\n格式要求：PNG、JPG、JPEG、BMP\nimg_base64和img_url 二选一"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/1755?tab=book"
  },
  "x-apiCode": "1755",
  "x-is-own": true,
  "x-is-op": true
}