API & MCP

Everything a person can do on PDF ↔ Image Converter, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

PDF ↔ Image Converter

Renders the pages of a PDF as PNG or JPG at 72–300 DPI (one image, or a ZIP for several pages) with a preview of the first page. In the other direction it packs JPG, PNG, TIFF, GIF or WebP images into one PDF; JPG and PNG are embedded losslessly with img2pdf, and you choose page size, fit and order.

Inputs of PDF ↔ Image Converter
FieldTypeDefaultDescription
directionselect (pdf-to-images, images-to-pdf)"pdf-to-images"Conversion
file (required)file—PDF or image. Max 100 MB in total.
file2file—Image 2 (images to PDF). Optional additional image.
file3file—Image 3 (images to PDF). Optional additional image.
file4file—Image 4 (images to PDF). Optional additional image.
file5file—Image 5 (images to PDF). Optional additional image.
zipfile—ZIP with more images (images to PDF). Optional: up to 25 images in total, added after the single files in file-name order.
formatselect (png, jpeg)"png"Image format (PDF to images)
dpiinteger150Resolution (PDF to images). 72 = screen size, 150 = good for reading, 300 = print quality.
pagestext—Pages (PDF to images). Page numbers start at 1. Examples: "1-3,5,8-end", "odd", "even", "reverse", "10-1" (descending), "1-9:odd". Leave empty for all pages. At most 100 pages per run.
jpegQualityinteger90JPG quality
pageSizeselect (image, a4, a4-landscape, letter, letter-landscape)"image"Page size (images to PDF)
fitselect (into, fill, exact)"into"Fit on the page (images to PDF)
marginnumber0Margin (images to PDF, fixed page sizes). 72 pt = 1 inch = 25.4 mm.
ordertext—Image order. Numbers of the images in the order to use, e.g. "2,1,3". Empty = upload order.
passwordtext—PDF password (only if the file is protected). Used only to open the file for this conversion; it is written to a private temporary file, never to a command line, and deleted with the job.

Example request

Two-page PDF to PNG at 72 DPI

curl -X POST https://pdfimageconverter.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"direction":"pdf-to-images","format":"png","dpi":72,"file":{"filename":"slides.pdf","contentType":"application/pdf","contentBase64":"JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5k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SAwIFIgPj4Kc3RhcnR4cmVmCjY1MgolJUVPRgo="}}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "pdf-image-converter": { "type": "http", "url": "https://pdfimageconverter.usefulweb.site/mcp" }
  }
}