Rendering documents
A render takes a published version and your values, and makes a PDF (or page images) laid out exactly as the editor shows the template. There are two ways to get the result:
- Answered directly: ask for the file with an
Acceptheader and it comes back in the answer. Nothing is kept. - Kept as an output: without
Accept, the server keeps the file for 24 hours and answers with its report and a link to download it.
Renders here wait for the result, up to 30 seconds. For longer work, or many documents, use jobs or batches.
A PDF, answered directly
Section titled “A PDF, answered directly”curl -H "Authorization: Bearer $PAPRIKA_KEY" -H "Content-Type: application/json" -H "Accept: application/pdf" -d '{"values": {"name": "Grace Hopper", "role": "Keynote speaker"}}' -o grace.pdf "$PAPRIKA_URL/v1/templates/tpl_9fK2mQ7rLx4VbN1s/versions/latest/render"What made it comes in headers: X-Template-Version, X-Export-Profile, X-Print-Status, and X-Warnings with any layout warnings.
A PDF, kept as an output
Section titled “A PDF, kept as an output”curl -H "Authorization: Bearer $PAPRIKA_KEY" -H "Content-Type: application/json" -d '{"values": {"name": "Grace Hopper", "role": "Keynote speaker"}}' "$PAPRIKA_URL/v1/templates/tpl_9fK2mQ7rLx4VbN1s/versions/latest/render"The answer (201) is the output’s report:
{ "id": "out_Q2nW8vX4zR6tY1uI3oP5", "template": "tpl_9fK2mQ7rLx4VbN1s", "version": 1, "format": "pdf", "printStatus": "Screen PDF", "warnings": [], "filename": "badge.pdf", "expiresAt": "2026-11-07T15:02:05.115Z", "download": "/v1/outputs/out_Q2nW8vX4zR6tY1uI3oP5"}Download it, or ask for its report again:
curl -H "Authorization: Bearer $PAPRIKA_KEY" -o grace.pdf "$PAPRIKA_URL/v1/outputs/out_Q2nW8vX4zR6tY1uI3oP5"curl -H "Authorization: Bearer $PAPRIKA_KEY" "$PAPRIKA_URL/v1/outputs/out_Q2nW8vX4zR6tY1uI3oP5/report"To hand the file to someone without a key, such as a customer’s browser, make a signed link, valid for up to a week and never past the output’s expiry:
curl -H "Authorization: Bearer $PAPRIKA_KEY" -H "Content-Type: application/json" -d '{"expiresIn": 3600}' "$PAPRIKA_URL/v1/outputs/out_Q2nW8vX4zR6tY1uI3oP5/links"filename in the render request names the file; createdAt fixes the date stamped into it, so the same version, values and date always give the same bytes.
Page images
Section titled “Page images”Ask for png or jpeg instead of a PDF. Set the size by dpi (36 to 600, 150 by default) or by width and height in pixels, and pick pages with pages. One page can be answered directly:
curl -H "Authorization: Bearer $PAPRIKA_KEY" -H "Content-Type: application/json" -H "Accept: image/png" -d '{"values": {"name": "Grace Hopper", "role": "Keynote speaker"}, "format": "png", "width": 600}' -o grace.png "$PAPRIKA_URL/v1/templates/tpl_9fK2mQ7rLx4VbN1s/versions/latest/render"Kept as an output, the images are a ZIP of the pages, and each page can be downloaded on its own (/v1/outputs/<id>/pages/<n>). PNG takes transparent: true; JPEG takes quality (1 to 100).
Print templates
Section titled “Print templates”The template’s export profile decides the PDF: a screen PDF, or a print PDF/X-4 when it passes preflight (printStatus says which). "output": "screen" makes a screen proof of a print template. For what happens when a document has layout problems, such as text that doesn’t fit, see policy.