Skip to content
DocsAll

API Documentation

The DocsAll external API lets developers integrate document processing capabilities into their own applications. Pro includes 100 calls per month, Team includes 1000 calls per month.

Quick Start

  1. Upgrade to a Pro or Team plan
  2. Create an API Key in My Center
  3. Include it in the request header Authorization: Bearer da_xxx

Authentication

All API requests must include the API Key in the Header:

Authorization: Bearer da_your_api_key_here

1. Document Conversion API

Convert between PDF and Word/Excel/PPT, supporting 4 conversion types. 注:curl/服务端调用请用 JSON 格式(Cloudflare 平台会拦截非浏览器客户端的表单类 POST;浏览器端 multipart 不受影响)。

POST /api/v1/external/convert

Request Parameters

Field Type Description
fileFileFile to convert (max 50MB). JSON 格式: {"name":"document.pdf","data":"<base64>"}
typeStringConversion type: pdf-to-word / pdf-to-excel / word-to-pdf / excel-to-pdf / ppt-to-pdf

Example (curl, JSON mode)

curl -X POST https://docsall.com/api/v1/external/convert \
  -H "Authorization: Bearer da_xxx" \
  -H "Content-Type: application/json" \
  -d '{"type":"pdf-to-word","file":{"name":"document.pdf","data":"'$(base64 -w0 document.pdf)'"}}' \
  -o converted.docx

multipart/form-data 格式仍受支持:-F "[email protected]" -F "type=pdf-to-word"(仅限浏览器同源调用)。

2. AI Capabilities API

AI writing, summarization, translation, PPT outline generation.

POST /api/v1/external/ai

Request Body (JSON)

Field Type Description
actionStringwrite / summarize / translate / ppt-outline
messagesArrayMessage array, same format as OpenAI: [{"role":"user","content":"..."}]
systemPromptString?Custom system prompt (optional)
temperatureNumber?0-2, default 1.0
curl -X POST https://docsall.com/api/v1/external/ai \
  -H "Authorization: Bearer da_xxx" \
  -H "Content-Type: application/json" \
  -d '{"action":"summarize","messages":[{"role":"user","content":"Please summarize this text..."}]}'

3. PDF Processing API

PDF merge, split, rotate, compress. curl 调用请用 JSON 格式(含 base64 文件数据)。

POST /api/v1/external/pdf
action Additional Fields Description
mergefiles (multiple)Merge multiple PDFs
splitfile + pagesSplit PDF (e.g. pages="1-3,5,7-9")
rotatefile + angleRotate PDF (angle: 90/180/270)
compressfileCompress PDF

Example (curl, JSON mode)

curl -X POST https://docsall.com/api/v1/external/pdf \
  -H "Authorization: Bearer da_xxx" \
  -H "Content-Type: application/json" \
  -d '{"action":"merge","files":[{"name":"a.pdf","data":"'$(base64 -w0 a.pdf)'"},{"name":"b.pdf","data":"'$(base64 -w0 b.pdf)'"}]}' \
  -o merged.pdf

4. Image Processing API

Image compression, format conversion, resize, rotate. curl 调用请用 JSON 格式(含同样以 base64 编码文件数据)。

POST /api/v1/external/image
action Additional Fields Description
compressfile + quality?Compress to WebP (quality 1-100, default 80)
convertfile + formatFormat conversion (jpeg/png/webp)
resizefile + width/heightResize (maintain aspect ratio, no upscaling)
rotatefile + angleRotate (angle: 90/180/270)

Example (curl, compress)

curl -X POST https://docsall.com/api/v1/external/image \
  -H "Authorization: Bearer da_xxx" \
  -H "Content-Type: application/json" \
  -d '{"action":"compress","file":{"name":"photo.png","data":"'$(base64 -w0 photo.png)'"},"quality":80}' \
  -o photo.webp

Error Codes

Status Code Meaning
200Success
400Invalid request parameters
401Unauthorized (missing or invalid API Key)
403Free users have no API access
413File too large
429Monthly API quota exhausted
503Service not configured

Get Started with the API

Upgrade to a Pro or Team plan and create an API Key to start integrating

View Plans