Convert document (sync)
Convert a PDF, DOC/DOCX, XLS/XLSX, PPT/PPTX, OFD file, or common image into page images. XLSX input may instead return a native spreadsheet structure. Provide exactly one of file_url and file_base64.
The current implementation accepts at most 50 MiB and 260 pages. A synchronous request may reach the service timeout at approximately 120 seconds, so production integrations should prefer the asynchronous create and query endpoints. A failure branch may return HTTP 200 with code=success and data=null. Confirm that data exists, then inspect task_id, img_detail_list, or the spreadsheet structure fields. Returned URLs are currently valid for approximately one hour, but this is not a stable SLA; download them promptly.
Authorizations
Production API Key. You can find it under My API in the ADP platform. Make sure the API Key is active and belongs to the production environment.
Path Parameters
Tenant name. Default: laiye.
Body
- Use file URL
- Use Base64 file
Public HTTPS URL of the file to convert. Do not pass an internal-network URL or a URL containing long-lived credentials.
2048Base64 content of the file to convert. The decoded file can be at most 50 MiB.
Page scale factor. The server currently exposes no stable upper bound; use the default value unless necessary.
First page to convert, starting at 1. Omit it to start from the first page.
x >= 1Last page to convert, starting at 1 and not less than the first page. Omit it to continue through the last page.
x >= 1How page images are returned. URLs are temporary; Base64 significantly increases the response size.
url, base64 Response
Document conversion result. While processing is in progress or after a failure, the service may return an empty result or data=null.