Preview
GET /designs/:designId/preview?page=:nRenders 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
| Param | Type | Required | Notes |
|---|---|---|---|
designId | string | yes | The design id. |
Query parameters
| Param | Type | Required | Notes |
|---|---|---|---|
page | number | no | Zero-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