{
  "openapi": "3.0.3",
  "info": {
    "title": "PDF文档转换",
    "description": "告别文档格式迁移的繁琐耗时！本API提供工业级PDF解析能力，深度识别文本/表格/公式/图片等元素，完整保留原始排版逻辑，1:1输出Markdown/docx格式文档。无缝集成知识库构建、金融报告分析、学术论文规范转换等场景，助力办公效率提升200%。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/3275-3": {
      "x-pointCode": 3,
      "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": {
                            "allPages": {
                              "type": "number",
                              "description": "总页码"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "调用是否成功，0、成功，-1、失败"
                            },
                            "contentlist": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "description": "文件状态：\n1、preparing：准备中\n2、processing：执行中\n3、success：成功\n4、failed：失败"
                                  },
                                  "task_id": {
                                    "type": "string",
                                    "description": "任务id"
                                  },
                                  "ct": {
                                    "type": "string",
                                    "description": "上传时间"
                                  },
                                  "file_url": {
                                    "type": "string",
                                    "description": "文件地址，实效7天"
                                  },
                                  "download_url": {
                                    "type": "string",
                                    "description": "完整下载地址，实效7天"
                                  }
                                }
                              },
                              "description": "列表"
                            },
                            "remark": {
                              "type": "string",
                              "description": "描述信息"
                            },
                            "currentPage": {
                              "type": "number",
                              "description": "页码"
                            },
                            "allNum": {
                              "type": "number",
                              "description": "总数"
                            },
                            "maxResult": {
                              "type": "number",
                              "description": "当前返回最大数"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3275_3_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "string",
                    "description": "查询页码"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/3275-2": {
      "x-pointCode": 2,
      "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": {
                            "ret_code": {
                              "type": "number",
                              "description": "调用接口是否成功，0：成功、-1：失败"
                            },
                            "remark": {
                              "type": "string",
                              "description": "描述信息"
                            },
                            "file_url": {
                              "type": "string",
                              "description": "文件地址，实效7天"
                            },
                            "state": {
                              "type": "string",
                              "description": "文件状态\n1、preparing：准备中\n2、processing：执行中\n3、success：成功\n4、failed：失败"
                            },
                            "download_url": {
                              "type": "string",
                              "description": "完整下载地址，实效7天"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3275_2_POST",
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "description": "根据上传文档时返回的任务ID，查询转换后的文档",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3275-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 10,
      "x-connect-timeout": 10,
      "post": {
        "summary": "文件上传处理",
        "description": "支持上传不超过 100M 的 PDF 文件，可一键转换为 Markdown 或 Word 格式。按实际页数计费，超大文件建议分割后分次提交，满足多样化文档格式迁移需求。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "string",
                              "description": "接口是否调用成功，0、成功，-1：失败"
                            },
                            "remark": {
                              "type": "string",
                              "description": "描述信息"
                            },
                            "state": {
                              "type": "string",
                              "description": "处理状态：\n1、preparing：准备中\n2、processing：执行中\n3、success：成功\n4、failed：失败"
                            },
                            "task_id": {
                              "type": "string",
                              "description": "任务id"
                            },
                            "file_name": {
                              "type": "string",
                              "description": "文件名"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3275_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_byte": {
                    "type": "string",
                    "format": "binary",
                    "description": "pdf文件，和file_url file_base64 三选一"
                  },
                  "file_url": {
                    "type": "string",
                    "description": "可下载的pdf文件链接"
                  },
                  "file_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 104857600,
                    "description": "pdf文件的base64"
                  },
                  "type": {
                    "type": "string",
                    "description": "pdf转换后的格式：1、md\n2、docx"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "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/3275?tab=book"
  },
  "x-apiCode": "3275",
  "x-is-own": true,
  "x-is-op": true
}