{
    "openapi": "3.0.0",
    "info": {
        "title": "文本自动摘要 - API文档",
        "version": "1.0.0",
        "description": "通过人工智能算法，智能分析自动抽取文本中的关键内容并生成指定长度的摘要。适合在新闻标题生成、文本简介、各类文献摘要的生成和商品评论抽取等。注意：length参数设置过短，会抽出空白简介并成功计数，因此请设置合理长度。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/autoabstract\/index": {
            "get": {
                "summary": "文本自动摘要",
                "tags": [
                    "文本自动摘要"
                ],
                "description": "传递一段文本自动提炼文本摘要",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "text",
                        "in": "query",
                        "description": "文本内容，最大不超过1000",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "天行数据是上海觉克信息科技旗下平台，起步于2015年6月。我们致力于为个人和企业用户提供更标准、简洁、方便、高效的API接口平台。",
                            "description": "文本内容，最大不超过1000"
                        }
                    },
                    {
                        "name": "length",
                        "in": "query",
                        "description": "指定摘要长度上限，最大180",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 30,
                            "description": "指定摘要长度上限，最大180"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "length": {
                                            "type": "int",
                                            "example": 18,
                                            "description": "摘要实际长度，字符数"
                                        },
                                        "summary": {
                                            "type": "string",
                                            "example": "天行数据是上海觉克信息科技旗下平台。",
                                            "description": "文本简介"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "length": 18,
                                        "summary": "天行数据是上海觉克信息科技旗下平台。"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "文本自动摘要",
                "tags": [
                    "文本自动摘要"
                ],
                "description": "传递一段文本自动提炼文本摘要",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "text": {
                                        "type": "string",
                                        "example": "天行数据是上海觉克信息科技旗下平台，起步于2015年6月。我们致力于为个人和企业用户提供更标准、简洁、方便、高效的API接口平台。",
                                        "description": "文本内容，最大不超过1000"
                                    },
                                    "length": {
                                        "type": "int",
                                        "example": 30,
                                        "description": "指定摘要长度上限，最大180"
                                    }
                                },
                                "required": [
                                    "key",
                                    "text",
                                    "length"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "length": {
                                            "type": "int",
                                            "example": 18,
                                            "description": "摘要实际长度，字符数"
                                        },
                                        "summary": {
                                            "type": "string",
                                            "example": "天行数据是上海觉克信息科技旗下平台。",
                                            "description": "文本简介"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "length": 18,
                                        "summary": "天行数据是上海觉克信息科技旗下平台。"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}