{
    "openapi": "3.0.0",
    "info": {
        "title": "文本审核 - API文档",
        "version": "1.0.0",
        "description": "检测内容是否含有暴恐、色情\/低俗、涉政、监管要求封禁等内容。大文本应该使用post方式，且最大不超过1000个字符数。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/antispam\/index": {
            "get": {
                "summary": "文本审核",
                "tags": [
                    "文本审核"
                ],
                "description": "根据文本信息判断文本是否合规",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "content",
                        "in": "query",
                        "description": "待审核的文本内容，最大1000字符数",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "天行数据是一个简单易用的webapi平台",
                            "description": "待审核的文本内容，最大1000字符数"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "con": {
                                            "type": "string",
                                            "example": "合规",
                                            "description": "审核结果"
                                        },
                                        "+msg": {
                                            "type": "string",
                                            "example": "存在低俗辱骂不合规",
                                            "description": "不合规内容提示"
                                        },
                                        "list": {
                                            "type": "object",
                                            "description": "具体结果对象"
                                        },
                                        "trust": {
                                            "type": "float",
                                            "example": 0.8581,
                                            "description": "置信度"
                                        },
                                        "+deets": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "description": "恶意推广类型数组"
                                        },
                                        "+words": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "description": "不合规内容数组（语义判断时为空）"
                                        },
                                        "+subtype": {
                                            "type": "int",
                                            "example": 5,
                                            "description": "不合规具体类型，低质灌水0、暴恐涉毒1、文本色情2、政治敏感3、恶意推广4、低俗辱骂5"
                                        },
                                        "con_type": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "审核结果类型，合规1、不合规2、疑似3，审核失败4"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "con": "合规",
                                        "con_type": 1
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "文本审核",
                "tags": [
                    "文本审核"
                ],
                "description": "根据文本信息判断文本是否合规",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "content": {
                                        "type": "string",
                                        "example": "天行数据是一个简单易用的webapi平台",
                                        "description": "待审核的文本内容，最大1000字符数"
                                    }
                                },
                                "required": [
                                    "key",
                                    "content"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "con": {
                                            "type": "string",
                                            "example": "合规",
                                            "description": "审核结果"
                                        },
                                        "+msg": {
                                            "type": "string",
                                            "example": "存在低俗辱骂不合规",
                                            "description": "不合规内容提示"
                                        },
                                        "list": {
                                            "type": "object",
                                            "description": "具体结果对象"
                                        },
                                        "trust": {
                                            "type": "float",
                                            "example": 0.8581,
                                            "description": "置信度"
                                        },
                                        "+deets": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "description": "恶意推广类型数组"
                                        },
                                        "+words": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "description": "不合规内容数组（语义判断时为空）"
                                        },
                                        "+subtype": {
                                            "type": "int",
                                            "example": 5,
                                            "description": "不合规具体类型，低质灌水0、暴恐涉毒1、文本色情2、政治敏感3、恶意推广4、低俗辱骂5"
                                        },
                                        "con_type": {
                                            "type": "int",
                                            "example": 2,
                                            "description": "审核结果类型，合规1、不合规2、疑似3，审核失败4"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "con": "合规",
                                        "con_type": 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}