{
  "openapi": "3.0.3",
  "info": {
    "title": "印刷体OCR识别",
    "description": "提取印刷体文本图片的文字信息，支持多语言文本，如常用语种简体中文、英文。支持的图片类型：JPEG, PNG。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/926-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 45,
      "x-connect-timeout": 30,
      "post": {
        "summary": "印刷体图片文字识别",
        "description": "此接口并发不可超过10\n此接口并发不可超过10\n提取印刷体的文字信息，支持多语言文本。也支持部分手写楷书中文识别。建议上传图片像素大小不超过1200X1200",
        "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表示识别成功\n 10 参数错误\n        20 文件格式错误\n        30 操作失败,请勿重复提交\n        40 文件下载失败\n        50 文件内容过大\n        60 图片解析失败\n        70 OCR识别失败\n        80 服务超时\n        90 识别异常"
                            },
                            "str": {
                              "type": "string",
                              "description": "识别结果的一整个字符串，不同行用换行符分割"
                            },
                            "remark": {
                              "type": "string",
                              "description": "错误信息"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "926_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "要识别图片的base64字符串，支持jpg和png图片，，图片大小不要超过0.7M，图片像素大小小于1200*1200。这个参数和img_url二选一入参。"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "要识别图片的URL，支持jpg和png图片，，图片大小不要超过1M，图片像素大小小于1200*1200，这个参数和img_base64二选一入参。"
                  },
                  "need_all_region": {
                    "type": "string",
                    "description": "是否需要所有坐标,1表示需要，0表示不需要"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "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/926?tab=book"
  },
  "x-apiCode": "926",
  "x-is-own": false,
  "x-is-op": true
}