API reference
The workbench is a client of this API and uses nothing else. Base URL: http://localhost:5481/api/v1
A conversion in three calls
# 1. start it
curl -F "file=@report.docx" -F "to=md" http://localhost:5481/api/v1/jobs
# -> { "id": "JOB_ID", "status": "queued", ... }
# 2. wait for "status": "done"
curl http://localhost:5481/api/v1/jobs/JOB_ID
# 3. fetch the result
curl -OJ http://localhost:5481/api/v1/jobs/JOB_ID/downloadAuthentication
Without a key, requests count as a guest by IP address. Create a key on your dashboard and send it with each request, and they count against your plan instead.
curl -H "Authorization: Bearer cvk_your_key" \
-F "file=@photo.png" -F "to=webp" http://localhost:5481/api/v1/jobsEndpoints
GET /formats
Every format with its category and whether it converts today.
curl http://localhost:5481/api/v1/formatsGET /formats/:id/targets
What a format can become, what can become it, and the settings each conversion accepts.
curl http://localhost:5481/api/v1/formats/png/targetsPOST /jobs
Start a conversion. Multipart form with "file", "to" and an optional "options" JSON string. Answers 201 with the job.
curl -F "file=@photo.png" -F "to=webp" -F 'options={"quality":70}' http://localhost:5481/api/v1/jobsPOST /jobs/merge
Join several images and PDFs into one PDF, in the order sent. Multipart form with two or more "files" and an optional "options" JSON string (pageSize: fit, a4 or letter).
curl -F "files=@cover.png" -F "files=@body.pdf" -F 'options={"pageSize":"a4"}' http://localhost:5481/api/v1/jobs/mergePOST /jobs/extract
Open an archive (ZIP, TAR, TAR.GZ, 7Z or RAR). When the job is done its "files" field lists what was inside.
curl -F "file=@bundle.zip" http://localhost:5481/api/v1/jobs/extractGET /jobs/:id/files/:index
One file from a finished extract job, by its position in the "files" list. The ordinary download address returns all of them as one zip.
curl -OJ http://localhost:5481/api/v1/jobs/JOB_ID/files/0GET /jobs/:id
The current state of a job: status, progress from 0 to 100, output name, error message, expiry time.
curl http://localhost:5481/api/v1/jobs/JOB_IDGET /jobs/:id/events
A Server-Sent Events stream of the same job object, sent on every change and closed when the job finishes.
curl -N http://localhost:5481/api/v1/jobs/JOB_ID/eventsGET /jobs/:id/download
The converted file. Answers 409 until the job is done.
curl -OJ http://localhost:5481/api/v1/jobs/JOB_ID/downloadPOST /jobs/download
One zip holding the results of several finished jobs. JSON body with up to 100 ids.
curl -X POST -H "Content-Type: application/json" -d '{"ids":["ID_1","ID_2"]}' -o files.zip http://localhost:5481/api/v1/jobs/downloadDELETE /jobs/:id
Cancel a job and delete its files now.
curl -X DELETE http://localhost:5481/api/v1/jobs/JOB_ID
Job statuses
queued, processing, then one of done, failed or cancelled. A conversion that fails is not an HTTP error: the job reports failed and puts the reason in error.
Errors
Every error response has the same shape.
{ "error": { "code": "UNSUPPORTED_PAIR", "message": "Cannot convert png to mp3" } }| Code | Meaning |
|---|---|
| UNSUPPORTED_PAIR | The file type was not recognised, or it cannot become the requested format. |
| FILE_TOO_LARGE | The file is over the size limit. |
| EMPTY_FILE | The file has no content. |
| INVALID_FILE | No file was sent, or more than one. |
| INVALID_OPTIONS | The options are not valid JSON, or a value is out of range. |
| ENGINE_UNAVAILABLE | The conversion exists but needs software the server does not have. |
| JOB_NOT_FOUND | The job does not exist or has expired. |
| FILE_NOT_FOUND | The extract job has no file at that position. |
| JOB_NOT_READY | The job has no file to download yet, or it failed. |
| QUOTA_EXCEEDED | The daily number of conversions for your plan is used up. |
| INVALID_KEY | The API key is unknown or was revoked. |
| RATE_LIMITED | Too many conversions were started in a short time. |
Limits
500 MB per file, 60 new conversions per 10 minutes from one address, 10 minutes per conversion. Results are deleted one hour after they are ready.