MintRender
All docs pages

Output formats, sizes and PDF pages

One template gives PNG, JPEG, WebP, SVG or PDF files, in its main size and up to 19 extra sizes. Pick the format with format and the sizes with sizes.

Formats

formatContent-TypeBackgroundscalequalityNotes
pngimage/pngTransparent where nothing is drawnYesNoLossless.
jpgimage/jpegWhite where nothing is drawnYesYesBaseline JPEG.
webpimage/webpTransparent where nothing is drawnYesYes
svgimage/svg+xmlTransparent where nothing is drawnNoNoText is drawn as outlines, so no fonts are needed to show it. Images are inside the file as data URLs.
pdfapplication/pdfAs the templateNoNoOne PDF page per template page. Vector shapes and text, with text you can select and search.

A template with no background colour, gradient or image has a transparent background. Images (PNG, JPEG, WebP, SVG) draw the first page of the template. A PDF has every page.

Sizes

Every template has the size main: the canvas width and height. It can have up to 19 extra sizes, each with a name, a width, a height and its own positions for each layer. In the editor, the sizes bar adds them from these presets and scales the layout. You then fix what needs it.

Preset nameForWidth × height (px)
ogOpen Graph1,200 × 630
squareSquare post1,080 × 1,080
storyStory1,080 × 1,920
youtubeYouTube thumbnail1,280 × 720
linkedinLinkedIn post1,200 × 627
a4A4794 × 1,123
a4-landscapeA4 landscape1,123 × 794
letterUS Letter816 × 1,056
  • Ask for sizes by name: "sizes": ["main", "og", "square"]. Each size is one file and costs one credit (or one per page for a PDF).
  • One request may ask for up to 20 sizes. More than 5 makes it a job.
  • An unknown name is a 400 whose message lists the template's sizes.
  • A size name is 1 to 32 lowercase letters, digits, _ or -.
  • Per size, a layer can change x, y, w, h, rotation, visible and, for text, size.

Scale and quality

scale (0.1 to 4, default 1) multiplies the pixel size of PNG, JPEG and WebP files. A 1200 × 630 template at scale 2 gives a 2400 × 1260 file for screens with dense pixels. A different scale is a different file and costs a credit. quality (1 to 100, default 90) sets JPEG and WebP compression: lower is smaller and less sharp.

Pages and PDF

  • A template has 1 to 100 pages. Each page has its own layers and can have its own background.
  • A PDF costs one credit per page per size. A 3-page certificate in one size costs 3 credits.
  • A sync render makes a PDF of up to 10 pages. Longer PDFs are jobs. Signed links make PDFs of up to 10 pages.
  • Set a value on one page with page2.title. A plain title sets every page that has it.
  • The page size is the canvas size, with 1 px = 0.75 pt (96 px per inch).
  • Text is drawn as exact outlines, with a hidden text layer on top so it can be selected and searched. Emoji have no text form.
  • Layers with a gradient, blur, shadow, blend mode or image filters are drawn as pictures inside the PDF. Their text stays selectable.
  • Images inside a PDF are JPEG or PNG. WebP and GIF images become PNG.
  • Two renders of the same PDF can differ in their bytes. The stored file is still reused for the same input.
PresetPixelsPDF page
A4794 × 1,123595.5 pt × 842.25 pt
A4 landscape1,123 × 794842.25 pt × 595.5 pt
US Letter816 × 1,056612 pt × 792 pt

Pixel limits

  • One image may have at most 8,294,400 pixels (3840 × 2160) after scale. A 2000 × 2000 template at scale 2 is over it.
  • The images a render draws may have at most 16 megapixels together, decoded.
  • A render may need about 96 MB of memory at most. The API checks this before it draws.

Over a limit, the answer is 400 limit with the limit in the message. All limits are on the Limits page.

Seen MintRender used for content that breaks our terms? Report it. Questions about the API: support@mintrender.com, with the request id.