Answer: Two conversion tools are documented here. office-to-pdf (POST /api/v1/tools/office-to-pdf, two credits) turns Word, Excel, PowerPoint and OpenDocument files into PDF. pdf-to-docx (POST /api/v2/tools/pdf-to-docx, two credits) turns a PDF that has a text layer into an editable Word document; a scan is refused with 422 no_text_layer.
office-to-pdf
A v1 file tool: send the document as multipart files= and any options as a JSON options field. The page-setup options in the table (fit, orientation, paper, sheets, single_page_sheets, scale) are read only on deployments with Office PDF options enabled; elsewhere the file converts exactly as sent and options are ignored. Where they are read, an unknown key is ignored and a known key with a bad value is a 422.
curl -X POST https://www.ashdocs.com/api/v1/tools/office-to-pdf \
-H "X-API-Key: ash_test_xxxxxxxx" \
-F "files=@quarterly-report.xlsx" \
-F 'options={"fit":"auto"}'pdf-to-docx
A v2 file tool: send the PDF as multipart file= (singular). It takes no options. Long documents are queued, as the table says.
curl -X POST https://www.ashdocs.com/api/v2/tools/pdf-to-docx \
-H "X-API-Key: ash_test_xxxxxxxx" \
-F "file=@contract.pdf"Inputs, options and responses
Generated from the backend source.
| Sent in | Key | What it does |
|---|---|---|
| file | office-to-pdf input types | Accepted extensions: doc, docx, xls, xlsx, ppt, pptx, odt, ods, odp, rtf, txt, csv, tsv. |
| office-to-pdf options | fit | none, auto, width, page. Default none — exactly today's conversion. auto measures the used range and rotates or scales only when it does not fit. |
| office-to-pdf options | orientation | auto, portrait, landscape. Default auto. |
| office-to-pdf options | paper | auto, A4, Letter. Default auto keeps the workbook's own paper size. |
| office-to-pdf options | sheets | all (default), active, or a list of sheet names. |
| office-to-pdf options | single_page_sheets | true puts each sheet on one page. Default false. |
| office-to-pdf options | scale | Print scale in percent, 10–400. Unset by default. |
| response | pdf-to-docx 422 no_text_layer | The PDF has no extractable text (a scan). Run ocr first, then convert its output. |
| response | pdf-to-docx queueing | A PDF over 20 pages is queued: 202 with a job id; the DOCX arrives by webhook or polling. Shorter PDFs return synchronously. |
| file | pdf-to-docx page limit | At most 200 pages per document. |
Frequently asked questions
Why does my spreadsheet split across pages?
fit defaults to none, which converts the workbook exactly as its own print settings say. Where Office PDF options are enabled, send fit: auto to rotate or scale a sheet that does not fit.
Can pdf-to-docx convert a scanned PDF?
No — it returns 422 no_text_layer. Run ocr first, then convert the OCR'd file.
Why do I get 202 from pdf-to-docx?
The PDF is long enough to be queued; the response carries a job id, and the DOCX arrives on your webhook or by polling the job.