{
  "openapi": "3.0.3",
  "info": {
    "title": "生成图片验证码",
    "description": "提供图片验证码生成服务，生成验证码图片及其中对应的文本信息。支持自定义内容及样式，默认字符范围使用数字+字母+2500个中文汉字，完美适配多终端，降低网站、系统、应用APP端的破解风险，防止恶意的资源消耗、系统注册和登录。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/26-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "图片验证码生成",
        "description": "图片验证码生成可以生成验证码图片,和图片中对应的文本信息。是为了增强网站或应用程序的安全性，防止自动化程序和恶意攻击，确保只有合法用户能够进行操作。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "img_path": {
                              "type": "string",
                              "description": "生成的图片路径"
                            },
                            "text": {
                              "type": "string",
                              "description": "此验证码图片实际代表的文字"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "是否成功"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "26_4_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "border": {
                    "type": "string",
                    "description": "图片边框：yes , no\t"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "边框颜色： r,g,b (and optional alpha) 或者 white,black,blue.\t"
                  },
                  "border_thickness": {
                    "type": "string",
                    "description": "边框厚度"
                  },
                  "image_width": {
                    "type": "string",
                    "description": "图片宽\t"
                  },
                  "image_height": {
                    "type": "string",
                    "description": "图片高\t"
                  },
                  "textproducer_char_length": {
                    "type": "string",
                    "description": "验证码长度，也就是几个字符\t"
                  },
                  "textproducer_font_size": {
                    "type": "string",
                    "description": "字体大小\t"
                  },
                  "textproducer_font_color": {
                    "type": "string",
                    "description": "字体颜色，合法值： r,g,b  或者 white,black,blue.\t"
                  },
                  "textproducer_char_space": {
                    "type": "string",
                    "description": "文字间隔\t"
                  },
                  "noise_color": {
                    "type": "string",
                    "description": "干扰颜色，合法值： r,g,b 或者 white,black,blue.\t"
                  },
                  "textproducer_char_type": {
                    "type": "string",
                    "description": "文本类型:  \n0：数字+小写字母+大写字母+中文；\n1：数字；\n2：小写字母；\n3、大写字母；\n4：中文；\n5：数字+小写字母\n6：数字+大写字母\n7：小写字母+大写字母\n8：数字+小写字母+大写字母"
                  },
                  "obscurificator_type": {
                    "type": "string",
                    "description": "图片样式：\n0:水纹\n1:鱼眼\n2:阴影"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "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/26?tab=book"
  },
  "x-apiCode": "26",
  "x-is-own": false,
  "x-is-op": true
}