Developer API
Use the same upload, process and download flow as the web tools. All addresses below are relative to this installation.
Interactive API reference Tool catalog and options
1. Upload a file
curl -F "file=@document.pdf" http://localhost:8000/api/files/upload
The response includes id, name, size and, for readable PDFs, pages. Use the returned ID in your task.
2. Create a task
POST /api/tasks
Content-Type: application/json
{"type":"extractPages","files":["YOUR_FILE_ID"],"pages":"1-3"}
A successful task request returns the task ID as a JSON string. A busy server returns HTTP 429; an enabled hourly quota returns HTTP 402. Invalid input returns HTTP 400.
3. Poll and download
GET /api/tasks/YOUR_TASK_ID/change
Poll every three seconds until status is Completed or Failed. For completed tasks, prefix resultFullUrlPattern with your server's scheme, then replace %7B%7Bfilename%7D%7D with the URL-encoded resultFilename. Multiple results are packaged as a ZIP; individual filenames appear in resultItems.
You can open /result?id=YOUR_TASK_ID in a browser, cancel with POST /api/tasks/YOUR_TASK_ID/cancel, or delete with DELETE /api/tasks/YOUR_TASK_ID.
Keep IDs private
File IDs and task IDs grant access to their files and actions. Treat them like passwords. Anyone with a result link or task ID can retrieve that result until it expires. Do not place confidential task IDs in public logs.
Uploads expire 2.0 hours after their last keep-alive. Results expire 2.0 hours after completion. Task records are held in memory, so restarting the server invalidates task links.