{
    "openapi": "3.0.0",
    "info": {
        "title": "藏头诗生成 - API文档",
        "version": "1.0.0",
        "description": "生成五言或七言藏头诗，并可以指定押韵类型和藏头位置。当藏头诗只有奇数句时，系统将尝试自动补全。接口实时返回三行结果，参数相同时每3秒重新生成一次。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/cangtoushi\/index": {
            "get": {
                "summary": "藏头诗生成",
                "tags": [
                    "藏头诗生成"
                ],
                "description": "根据指定参数生成五言或七言藏头诗，支持指定关键词位置",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "len",
                        "in": "query",
                        "description": "诗句格式，0五言诗[默认]、1七言诗",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 0,
                            "description": "诗句格式，0五言诗[默认]、1七言诗"
                        }
                    },
                    {
                        "name": "pat",
                        "in": "query",
                        "description": "押韵类型，1双句一压[默认]、2双句押韵、3一三四押",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "押韵类型，1双句一压[默认]、2双句押韵、3一三四押"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "藏头位置，1藏头[默认]、2藏尾、3藏中、4递增、5递减",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "藏头位置，1藏头[默认]、2藏尾、3藏中、4递增、5递减"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "藏字内容，2-8个字",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "天行数据",
                            "description": "藏字内容，2-8个字"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "content": {
                                            "type": "string",
                                            "example": "天地如有知，行春潘令至。数亩子平居，据一陵二小......",
                                            "description": "藏头诗内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "content": "天降立制成，行随舞凤来。数杯罢复饮，据梧听好鸟。"
                                            },
                                            {
                                                "content": "天下举宫商，行歌南陌上。数示晓灵征，据施景西考。"
                                            },
                                            {
                                                "content": "天书忽告迁，行子去未已。数枝零落梅，据吉逾诗序。"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "藏头诗生成",
                "tags": [
                    "藏头诗生成"
                ],
                "description": "根据指定参数生成五言或七言藏头诗，支持指定关键词位置",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "len": {
                                        "type": "int",
                                        "example": 0,
                                        "description": "诗句格式，0五言诗[默认]、1七言诗"
                                    },
                                    "pat": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "押韵类型，1双句一压[默认]、2双句押韵、3一三四押"
                                    },
                                    "type": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "藏头位置，1藏头[默认]、2藏尾、3藏中、4递增、5递减"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "天行数据",
                                        "description": "藏字内容，2-8个字"
                                    }
                                },
                                "required": [
                                    "key",
                                    "word"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "content": {
                                            "type": "string",
                                            "example": "天地如有知，行春潘令至。数亩子平居，据一陵二小......",
                                            "description": "藏头诗内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "content": "天降立制成，行随舞凤来。数杯罢复饮，据梧听好鸟。"
                                            },
                                            {
                                                "content": "天下举宫商，行歌南陌上。数示晓灵征，据施景西考。"
                                            },
                                            {
                                                "content": "天书忽告迁，行子去未已。数枝零落梅，据吉逾诗序。"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}