{
  "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": {
    "/3492-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 45,
      "x-connect-timeout": 5,
      "post": {
        "summary": "图片翻译",
        "description": "文本较多时可能需要15秒以上的返回时间，建议将http的读取超时时间设置在15秒以上",
        "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表示翻译成功，\n10 参数错误   \n20 文件格式错误  \n30 操作失败,请勿重复提交\n40 文件下载失败\n50 文件内容过大\n60 图片解析失败\n70 识别失败\n80 服务超时\n90 未知错误"
                            },
                            "remark": {
                              "type": "string",
                              "description": "错误信息"
                            },
                            "text": {
                              "type": "string",
                              "description": "文字翻译结果"
                            },
                            "url": {
                              "type": "string",
                              "description": "图片翻译结果（请尽快保存图片，我们会定期删除结果图）"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3492_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "imageBase64": {
                    "type": "string",
                    "description": "要翻译图片的base64字符串，建议文件大小不要超过5M，图像大小不要超过4096*4096，和imageUrl二选一入参"
                  },
                  "imageUrl": {
                    "type": "string",
                    "description": "要翻译图片的URL，建议文件大小不要超过7M，图像大小不要超过4096*4096，和imageBase64二选一入参"
                  },
                  "from": {
                    "type": "string",
                    "description": "源语言代码，必填，支持代码：\n    ar = 阿拉伯语 \n    pl = 波兰语   \n    da = 丹麦语   \n    de = 德语    \n    ru = 俄语    \n    fr = 法语    \n    ko = 韩语    \n    nl = 荷兰语   \n    ro = 罗马尼亚语\n    ms = 马来语   \n    ja = 日语    \n    sv = 瑞典语   \n    th = 泰语    \n    tr = 土耳其语 \n    es = 西班牙语 \n    el = 希腊语   \n    hu = 匈牙利语 \n    it = 意大利语 \n    id = 印尼语   \n    en = 英语    \n    vi = 越南语   \n    zh = 中文（简体）"
                  },
                  "to": {
                    "type": "string",
                    "description": "目标语言代码，必填，支持代码：\n    ar = 阿拉伯语 \n    pl = 波兰语   \n    da = 丹麦语   \n    de = 德语    \n    ru = 俄语    \n    fr = 法语    \n    ko = 韩语    \n    nl = 荷兰语   \n    ro = 罗马尼亚语\n    ms = 马来语   \n    ja = 日语    \n    sv = 瑞典语   \n    th = 泰语    \n    tr = 土耳其语 \n    es = 西班牙语 \n    el = 希腊语   \n    hu = 匈牙利语 \n    it = 意大利语 \n    id = 印尼语   \n    en = 英语    \n    vi = 越南语   \n    zh = 中文（简体）"
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            }
          }
        }
      }
    }
  },
  "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/3492?tab=book"
  },
  "x-apiCode": "3492",
  "x-is-own": false,
  "x-is-op": false
}