{
    "openapi": "3.0.0",
    "info": {
        "title": "图像审核 - API文档",
        "version": "1.0.0",
        "description": "判断网络图像是否违禁，支持img传递图片的base64编码或者imgurl传递网络图片url，支持识别色情、政治人物和暴恐类型。无论哪种方式，图片大小不超过6M。base64编码测试工具：<a href=\"\/demo\/base64\" target=\"_blank\">图片\/base64互转<\/a>"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/imgcensor\/index": {
            "get": {
                "summary": "图像审核",
                "tags": [
                    "图像审核"
                ],
                "description": "根据图像信息判断图片是否合规",
                "parameters": [
                    {
                        "name": "img",
                        "in": "query",
                        "description": "图片base64编码（与imgurl参数二选一）",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "base64",
                            "description": "图片base64编码（与imgurl参数二选一）"
                        }
                    },
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "imgurl",
                        "in": "query",
                        "description": "图片URL（支持jpg\/png\/bmp\/gif格式）",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "https:\/\/www.tianapi.com\/static\/img\/ocr\/bz.jpg",
                            "description": "图片URL（支持jpg\/png\/bmp\/gif格式）"
                        }
                    },
                    {
                        "name": "imgtype",
                        "in": "query",
                        "description": "图片类型，静态0[默认]，动态1",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 0,
                            "description": "图片类型，静态0[默认]，动态1"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "+msg": {
                                            "type": "string",
                                            "example": "存在爆炸火灾",
                                            "description": "不合规内容提示"
                                        },
                                        "list": {
                                            "type": "object",
                                            "description": "具体结果数组"
                                        },
                                        "+type": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "不合规类型，色情1、暴恐2、涉政5"
                                        },
                                        "conclusion": {
                                            "type": "string",
                                            "example": "合规",
                                            "description": "审核提示"
                                        },
                                        "conclusionType": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "审核结果类型，合规1、不合规2、疑似3、审核失败4"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "conclusion": "合规",
                                        "conclusionType": 1
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "图像审核",
                "tags": [
                    "图像审核"
                ],
                "description": "根据图像信息判断图片是否合规",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "img": {
                                        "type": "string",
                                        "example": "base64",
                                        "description": "图片base64编码（与imgurl参数二选一）"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "imgurl": {
                                        "type": "string",
                                        "example": "https:\/\/www.tianapi.com\/static\/img\/ocr\/bz.jpg",
                                        "description": "图片URL（支持jpg\/png\/bmp\/gif格式）"
                                    },
                                    "imgtype": {
                                        "type": "int",
                                        "example": 0,
                                        "description": "图片类型，静态0[默认]，动态1"
                                    }
                                },
                                "required": [
                                    "img",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "+msg": {
                                            "type": "string",
                                            "example": "存在爆炸火灾",
                                            "description": "不合规内容提示"
                                        },
                                        "list": {
                                            "type": "object",
                                            "description": "具体结果数组"
                                        },
                                        "+type": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "不合规类型，色情1、暴恐2、涉政5"
                                        },
                                        "conclusion": {
                                            "type": "string",
                                            "example": "合规",
                                            "description": "审核提示"
                                        },
                                        "conclusionType": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "审核结果类型，合规1、不合规2、疑似3、审核失败4"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "conclusion": "合规",
                                        "conclusionType": 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}