QUICKSTART / 5 MINUTES

Your first DOCX conversion.

The API is intentionally small: upload a file, keep the job id, and fetch the result when it is ready.

01 / CREATE

Upload a DOCX

Send the file as a multipart form field named file. In a deployed environment, include your X-API-Key.

curl -X POST http://localhost:8080/v1/convert \
        -H "X-API-Key: $DOCX_PDF_API_KEY" \
      -F "file=@contract.docx"
202 Accepted{ "job_id": "a81f...72c", "status": "pending" }

02 / CHECK

Poll until done

Use the job id to check progress. A completed job includes the output object key; a failed job includes an actionable error.

curl http://localhost:8080/v1/jobs/a81f...72c \
        -H "X-API-Key: $DOCX_PDF_API_KEY"
200 OK{ "job_id": "a81f...72c", "status": "done", "output_key": "output/a81f...72c.pdf" }

03 / DOWNLOAD

Fetch the PDF

Once the job is done, download the generated PDF from the job-scoped endpoint.

curl -L http://localhost:8080/v1/jobs/a81f...72c/pdf \
          -H "X-API-Key: $DOCX_PDF_API_KEY" \
        -o converted.pdf

04 / LOCAL

Run the working example

From the DOCX PDF repository, start the Docker stack and run the included smoke test. It creates a small DOCX, uploads it, and waits for a PDF job to complete.

docker compose -f infra/docker-compose.yml up -d
.\scripts\smoke_docx_upload.ps1

Expected result
The terminal prints SUCCESS: job completed after the worker renders the PDF.