Skip to Content

Preview

GET /designs/:designId/preview?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.

Path parameters

ParamTypeRequiredNotes
designIdstringyesThe design id.

Query parameters

ParamTypeRequiredNotes
pagenumbernoZero-based page index. Default 0.
curl "https://api.imaginepdf.com/api/v1/designs/design_abc123/preview?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 (each element shows its design-time content). To see filled output, generate a PDF with POST /designs/:id/generate.

Last updated on