{
    "openapi": "3.0.0",
    "info": {
        "title": "二维码解码 - API文档",
        "version": "1.0.0",
        "description": "请传递图片base64编码数据或图片地址（任选其一），自动识别常见的二维码类型。请注意：该接口请使用POST方式请求，base64数据大小不超过6M。在保证图片清晰度的情况下，图片越小识别速度越快，结果也越稳定。base64测试工具：<a href=\"\/demo\/base64\/\" target=\"_blank\">图片\/base64互转<\/a>"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/codec\/index": {
            "post": {
                "summary": "二维码识别",
                "tags": [
                    "二维码解码"
                ],
                "description": "指定二维码图像解析识别原始信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "qrpic": {
                                        "type": "string",
                                        "example": "base64",
                                        "description": "二维码图片base64编码"
                                    },
                                    "qrurl": {
                                        "type": "string",
                                        "example": "https:\/\/www.tianapi.com\/static\/img\/wechat.jpg",
                                        "description": "二维码图片地址(二选一)"
                                    }
                                },
                                "required": [
                                    "key",
                                    "qrpic"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "qrtype": {
                                            "type": "string",
                                            "example": "WeChat",
                                            "description": "二维码类型"
                                        },
                                        "qrcodec": {
                                            "type": "string",
                                            "example": "http:\/\/weixin.qq.com\/r\/nEx-ZyfEaXoWrWME9xmO",
                                            "description": "二维码内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "qrtype": "WeChat",
                                        "qrcodec": "http:\/\/weixin.qq.com\/r\/nEx-ZyfEaXoWrWME9xmO"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}