HTTP API¶
The PressJet API runs on your own deployment. For the examples below, use the local server from the quickstart at http://127.0.0.1:8080.
Authentication and request bodies¶
Pass Authorization: Bearer <key> with requests to protected routes. JSON requests set Content-Type: application/json and include "version":1. The OpenAPI contract describes request fields, operations, response types, and authentication. See API keys for permissions and rotation.
Examples by operation¶
- Render HTML or a native document, and get a PNG preview.
- Check layout before rendering.
- Merge, rasterize, or sign an existing PDF.
Choose an endpoint¶
| Method and path | Use it to |
|---|---|
GET /health |
Check that the server is responding |
GET /v1/info |
Inspect available operations, fonts, and limits |
POST /v1/html |
Print populated HTML and CSS |
POST /v1/generate |
Render a native document tree |
POST /v1/check |
Inspect layout diagnostics |
POST /v1/preview |
Preview document pages as PNG |
POST /v1/draw |
Render text that flows across pages |
POST /v1/merge |
Combine PDFs |
POST /v1/rasterize |
Render existing PDF pages as images |
POST /v1/sign |
Sign a PDF with a deployment certificate |
POST /v1/verify |
Verify a PressJet page code |
See stored templates and durable jobs for deployment-specific routes.
Handle responses¶
PDF endpoints such as /v1/generate and /v1/html return application/pdf. Save or stream those bytes directly. Check the HTTP status before treating the body as a file. Failed requests return a problem document with a stable code. Log its request ID and use the error reference to decide whether to change the input or retry.