Base URL
https://docify.site/api
All responses are generated in memory and returned directly to your script. Docify does not store submitted documents or images.
Quick reference
| Method | Endpoint | Output |
|---|---|---|
| GET | /health | Service status JSON |
| POST | /v1/pdf | PDF file |
| POST | /v1/images | Optimized image file |
Generate a PDF
POST https://docify.site/api/v1/pdf
Send JSON containing HTML with inline CSS. The response is an application/pdf download.
curl -X POST https://docify.site/api/v1/pdf \
-H "Content-Type: application/json" \
--data '{"html":"<h1>Certificate of completion</h1><p>Alex Morgan</p>","format":"A4","landscape":false,"margin":15}' \
--output document.pdf| Field | Details |
|---|---|
html | Required HTML string, maximum 200,000 characters |
format | A4 (default) or Letter |
landscape | Boolean; default is false |
margin | Integer from 0–40 mm; default is 15 |
Scripts, remote assets, forms, and navigation are disabled. Use inline CSS and embedded data-image URLs only.
Optimize an image
POST https://docify.site/api/v1/images
Send raw PNG, JPEG, or WebP bytes with the matching Content-Type; do not use multipart form data. The response is the optimized image.
curl -X POST "https://docify.site/api/v1/images?width=1200&height=800&quality=80&format=webp" \
-H "Content-Type: image/png" \
--data-binary @photo.png \
--output photo.webp| Query parameter | Details |
|---|---|
width | Maximum width, 1–8192 px; default 1920 |
height | Maximum height, 1–8192 px; default 1080 |
quality | 10–100; default 80. Ignored for PNG. |
format | webp (default), jpeg, or png |
Images must be under 20 MB and 24 megapixels. Resizing preserves proportions and never enlarges an image. Animated input is not supported; JPEG uses a white background for transparency.
Use it responsibly
The public service currently needs no authentication and allows up to 30 requests per minute per IP address. Errors are returned as JSON with an error field. Retry 429 and 503 responses after a short delay.
400: invalid JSON or options413: request is too large415/422: unsupported or invalid input429: rate limit reached503: service is busy
These endpoints are intended for server-side scripts and personal automation. Browser applications hosted on another domain are not allowed by the current CORS policy.