Skip to content
Convertly

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/download

Authentication

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/jobs

Endpoints

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" } }
CodeMeaning
UNSUPPORTED_PAIRThe file type was not recognised, or it cannot become the requested format.
FILE_TOO_LARGEThe file is over the size limit.
EMPTY_FILEThe file has no content.
INVALID_FILENo file was sent, or more than one.
INVALID_OPTIONSThe options are not valid JSON, or a value is out of range.
ENGINE_UNAVAILABLEThe conversion exists but needs software the server does not have.
JOB_NOT_FOUNDThe job does not exist or has expired.
FILE_NOT_FOUNDThe extract job has no file at that position.
JOB_NOT_READYThe job has no file to download yet, or it failed.
QUOTA_EXCEEDEDThe daily number of conversions for your plan is used up.
INVALID_KEYThe API key is unknown or was revoked.
RATE_LIMITEDToo 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.