Skip to Content

Preview

GET /preview?design=:designId&page=:n

Renders one page of a design to a PNG and returns a temporary URL. Free — no credits are consumed. Use it to check a layout while you iterate, before spending a credit on a full PDF.

Query parameters

ParamTypeRequiredNotes
designstringyesThe design id.
pagenumbernoZero-based page index. Default 0.
curl "https://api.imaginepdf.com/api/v1/preview?design=design_abc123&page=0" \ -H "X-API-Key: $IMAGINEPDF_API_KEY"

Response 200 OK

{ "status": "success", "data": { "previewUrl": "https://storage.imaginepdf.com/preview.png?signature=...", "expiresIn": 3600, "page": 0 }, "error": null }
  • previewUrl — presigned URL to the rendered PNG.
  • expiresIn — seconds the URL stays valid (3600 = one hour).
  • page — the page index that was rendered.

Previews never bind variable values — they render the design as authored (placeholders show their default text). To see filled output, generate a PDF with POST /generate.