{
  "openapi": "3.0.3",
  "info": {
    "title": "趣味对联",
    "description": "本接口巧妙地将对联艺术与幽默相结合，旨在根据用户提供的上联，创意性地炮制出一系列既搞笑又充满趣味的下联，并搭配点睛之笔的横批。举例来说，当输入“书到用时方恨少”，本接口便能机智地回应一组下联，如“钱到花时方知紧”，并以“生活哲理”作为横批，生动地描绘出生活中的小幽默。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/3214-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 30,
      "x-connect-timeout": 30,
      "post": {
        "summary": "对下联",
        "description": "该接口可用于教育、文化娱乐及语言学习等场景。例如，在在线教育平台中，学生可以通过输入上联来练习对联创作，系统即时返回多个下联和中联供学生参考学习，增强学生对汉语语言韵律和对称美的理解。在文化娱乐方面，该接口可以作为互动游戏的一部分，让用户在游戏中体验中国传统文化的魅力，如春节对联挑战赛。此外，对于汉语学习者来说，这个接口可以帮助他们更好地理解中文的对仗结构和语义关联。",
        "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表示创作成本 -1表示失败"
                            },
                            "coupletList": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "second": {
                                    "type": "string",
                                    "description": "AI创作的下联"
                                  },
                                  "horizontal": {
                                    "type": "string",
                                    "description": "AI创作的横批"
                                  },
                                  "first": {
                                    "type": "string",
                                    "description": "你的上联"
                                  }
                                }
                              },
                              "description": "对联List"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3214_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "first": {
                    "type": "string",
                    "minLength": 9,
                    "maxLength": 36,
                    "description": "你的上联，最少三个汉字，最多12个汉字"
                  }
                },
                "required": [
                  "first"
                ]
              }
            }
          }
        }
      }
    }
  },
  "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/3214?tab=book"
  },
  "x-apiCode": "3214",
  "x-is-own": false,
  "x-is-op": false
}