API REFERENCE / V1

Small surface area. Clear contracts.

The first version has three endpoints and four meaningful states: pending, processing, done, and failed.

AUTHENTICATION

Keep your API key server-side.

Set API_KEY in the deployment environment, then send it as X-API-Key on every /v1/ request. The /healthz readiness endpoint remains public.

curl http://localhost:8080/v1/jobs/{id} \
  -H "X-API-Key: $DOCX_PDF_API_KEY"
BASE URLhttp://localhost:8080
POST
/v1/convert

Queue a DOCX file for conversion.

Request
multipart/form-data: file
Response
202 Accepted
GET
/v1/jobs/{id}

Read the current state of a conversion job.

Request
None
Response
200 OK
GET
/v1/jobs/{id}/pdf

Download the rendered PDF after the job completes.

Request
None
Response
200 OK ยท application/pdf

JOB STATES

pending

Accepted and waiting in the queue.

processing

The worker is rendering the document.

done

A PDF output is available.

failed

Rendering stopped with an error message.