MintRender
All docs pages

Merge PDFs and turn PDF pages into images

Join PDFs into one file, or make a picture of each page. The PDFs can be links, files you made with MintRender, or files you upload.

Merge PDFs

curl

curl -X POST "https://mintrender.com/v1/pdf/merge" \  -H "Authorization: Bearer $MINTRENDER_KEY" \  -H "Content-Type: application/json" \  -d '{"files":[{"url":"https://example.com/cover.pdf"},{"render":"rnd_9x7Lm2Qp8sT4vB0nC6kR"}]}'

JavaScript

const res = await fetch("https://mintrender.com/v1/pdf/merge", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.MINTRENDER_KEY}`,    "Content-Type": "application/json",  },  body: JSON.stringify({    files: [      {        url: "https://example.com/cover.pdf",      },      {        render: "rnd_9x7Lm2Qp8sT4vB0nC6kR",      },    ],  }),});const body = await res.json();if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message} (${body.error.request_id})`);console.log(body);

Python

import os import requests res = requests.post(    "https://mintrender.com/v1/pdf/merge",    headers={"Authorization": f"Bearer {os.environ['MINTRENDER_KEY']}"},    json={        "files": [            {                "url": "https://example.com/cover.pdf",            },            {                "render": "rnd_9x7Lm2Qp8sT4vB0nC6kR",            },        ],    },    timeout=120,)body = res.json()if not res.ok:    raise RuntimeError(f"{body['error']['code']}: {body['error']['message']} ({body['error']['request_id']})")print(body)

The PDFs are joined in the order you send them. {"render": "rnd_…"} takes a PDF this workspace made and still keeps. The answer has one PDF. It costs 1 credit.

PDF pages to images

curl

curl -X POST "https://mintrender.com/v1/pdf/to-images" \  -H "Authorization: Bearer $MINTRENDER_KEY" \  -H "Content-Type: application/json" \  -d '{"file":{"url":"https://example.com/brochure.pdf"},"format":"png","pages":"1-3","dpi":150}'

JavaScript

const res = await fetch("https://mintrender.com/v1/pdf/to-images", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.MINTRENDER_KEY}`,    "Content-Type": "application/json",  },  body: JSON.stringify({    file: {      url: "https://example.com/brochure.pdf",    },    format: "png",    pages: "1-3",    dpi: 150,  }),});const body = await res.json();if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message} (${body.error.request_id})`);console.log(body);

Python

import os import requests res = requests.post(    "https://mintrender.com/v1/pdf/to-images",    headers={"Authorization": f"Bearer {os.environ['MINTRENDER_KEY']}"},    json={        "file": {            "url": "https://example.com/brochure.pdf",        },        "format": "png",        "pages": "1-3",        "dpi": 150,    },    timeout=120,)body = res.json()if not res.ok:    raise RuntimeError(f"{body['error']['code']}: {body['error']['message']} ({body['error']['request_id']})")print(body)
  • pages: like "1-3,5" or "2-" (to the end). Default: every page, at most 50.
  • dpi: 72 to 300, default 150. A US Letter page at 150 dpi is 1275 × 1650 pixels.
  • Each output is one picture with its page number. zip: true adds one ZIP of all pictures, free.
  • Each picture is 1 credit.

Upload files

Make and n8n send files as multipart/form-data: file parts named files for a merge, and one part named file for images. The other fields go as text parts. The type is checked from the bytes, so a file that is not a PDF is refused with the field that holds it.

Limits

  • At most 25 MB of PDFs in one request. A merge makes at most 500 pages.
  • A PDF with a password is refused, with a message that names the file.
  • A page too large for the dpi you asked is refused, with the highest dpi that fits.

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