apyhub
Back
▣ FILE CONVERSION · FILE MANIPULATION

Convert PDF to Image API

Hosted on ApyHub

What it does

The PDF to image API converts each page of a PDF into a separate image file. Send the PDF as a file upload (up to 10 MB), a public URL in file_url, or base64 content in pdf_base64. You get the page images back as a ZIP download, or as a download_url you can store or pass along.

Set img_format to jpg (the default) or png, and choose quality from low, medium (the default), high or ultra. JPG keeps files small for previews and thumbnails. PNG keeps text and line art sharp for documents that will be read closely or processed further. Higher quality settings take longer to render.

Use the PDF to image API to show page previews in a document viewer or file manager, generate thumbnails for invoices and contracts in a dashboard, post report pages as images in chat or email where PDFs don't render inline, and prepare scanned pages for image-based processing such as OCR or vision models.

Common next steps: extract the text from each page with the Image OCR API, or shrink the output for the web with the Image Compression API. To go the other way and turn images back into a PDF, use the Image to PDF API.

▣ ENDPOINT 01 / 06
POST
Convert PDF pages to images
https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/file/download

QUICKSTART

GUIDE

Quickstart

Upload a PDF to convert its pages into images.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/file/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.pdf"

What you'll get back

Returns a binary file (string with format: binary) containing the converted image output.

TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
PDF file to convert. Max 10 MB.
Image rendering quality. Higher quality increases processing time.
Output image format for all pages.

About this endpoint

What it does

Converts an uploaded PDF file into page images and returns the result as a downloadable binary file. The request accepts the PDF plus optional rendering settings for image quality and output format.

Request Body

ParameterTypeDescription
fileBinaryPDF file to convert. Binary upload. Max 10 MB.
qualityENUMImage rendering quality. Allowed values: low, medium, high, ultra. Default: medium. Higher quality increases processing time.
img_formatENUMOutput image format for all pages. Allowed values: jpg, png. Default: jpg.

Response

Returns a binary file download containing the converted page images. The success response is a single binary payload, not a JSON object.

ParameterTypeDescription
binary responseStringDownloadable file content returned by the endpoint.

Notes

The uploaded PDF file must be no larger than 10 MB.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 06
POST
Convert PDF pages to images
https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/file/url

QUICKSTART

GUIDE

Quickstart

Upload a PDF file to convert its pages into images.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/file/url" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.pdf"

What you'll get back

Returns a JSON object with an optional download_url string field containing the URI to the generated images archive.

{
  "download_url": "https://s3.amazonaws.com/bucket/images.zip"
}
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Converts the pages of an uploaded PDF file into images and returns a download URL for the generated output. The request sends the PDF as a file upload and can optionally control image quality and output image format.

Request Body

ParameterTypeDescription
fileBinaryPDF file upload (binary format).
qualityENUMImage quality for the generated pages. Allowed values: low, medium, high, ultra. Default: medium.
img_formatENUMOutput image format. Allowed values: jpg, png. Default: jpg.

Response

Returns a JSON object with a download_url string field containing a URI to the generated images package. The success response body is an object with one top-level field: download_url (string).

ParameterTypeDescription
download_urlStringDownload URL for the generated output (uri format).

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 03 / 06
POST
Convert PDF pages to images
https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/url/download

QUICKSTART

GUIDE

Quickstart

Download a converted image version of a PDF from a public URL.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "file_url": "https://assets.apyhub.com/samples/sample.pdf"
  }'

What you'll get back

Returns a binary file (string with format: binary) containing the converted image data.

TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Publicly accessible PDF URL.

About this endpoint

What it does

Converts the PDF at the given public URL into page images and returns the result as a ZIP download. You provide the source PDF URL plus optional image quality and output image format.

Request Body

ParameterTypeDescription
file_urlStringPublicly accessible PDF URL. Format: URI.
qualityENUMOutput quality. Allowed values: low, medium, high, ultra. Default: medium.
img_formatENUMImage format for the generated pages. Allowed values: jpg, png. Default: jpg.

Response

Returns a binary response containing the ZIP download of the converted PDF pages.

▣ ENDPOINT 04 / 06
POST
Convert PDF pages to images
https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/url/url

QUICKSTART

GUIDE

Quickstart

Convert a PDF from a public URL into a set of page images by sending the PDF URL in a JSON body.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/url/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"file_url":"https://assets.apyhub.com/samples/sample.pdf"}'

What you'll get back

Returns a JSON object with a download_url string field containing the URL of the generated images archive.

{
  "download_url": "https://s3.amazonaws.com/bucket/images.zip"
}
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Converts a PDF available at a URL into page images and returns a JSON object containing a download_url for the generated output.

Request Body

ParameterTypeDescription
file_urlStringThe URL of the PDF to convert. Must be a URI.
qualityENUMImage quality: low, medium, high, or ultra. Default: medium.
img_formatENUMOutput image format: jpg or png. Default: jpg.

Response

Returns a JSON object with a download_url string field containing a URI for the generated images archive.

ParameterTypeDescription
download_urlStringA URI where the converted images can be downloaded.
▣ ENDPOINT 05 / 06
POST
Convert PDF pages to images
https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/base64/download

QUICKSTART

GUIDE

Quickstart

Convert a base64-encoded PDF into image files using the default medium quality and jpg format.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/base64/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pdf_base64": "JVBERi0xLjQKJcTl8uXrp..."
  }'

What you'll get back

Returns a binary file response (string with format: binary) containing the converted image output.

TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Base64-encoded PDF content.

About this endpoint

What it does

Converts a PDF provided as base64-encoded content into image files for its pages, and returns the result as a downloadable ZIP archive. The request body accepts the PDF content plus optional image quality and output format settings.

Request Body

ParameterTypeDescription
pdf_base64StringBase64-encoded PDF content.
qualityENUMImage quality. Allowed values: low, medium, high, ultra. Default: medium.
img_formatENUMOutput image format. Allowed values: jpg, png. Default: jpg.

Response

Returns a binary response containing the ZIP download. The output schema is a binary string, so the success response is a downloadable file rather than a JSON object.

▣ ENDPOINT 06 / 06
POST
Convert PDF pages to images
https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/base64/url

QUICKSTART

GUIDE

Quickstart

Convert a PDF passed as a base64 string into images in a downloadable archive.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-pages-to-images/base64/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pdf_base64": "JVBERi0xLjQKJc..."
  }'

What you'll get back

Returns a JSON object with an optional download_url string field containing the URL to the generated image archive.

{
  "download_url": "https://s3.amazonaws.com/bucket/images.zip"
}
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Converts a PDF provided as a base64 string into page images and returns a download URL for the generated output. The request body includes the source PDF and optional conversion settings for image quality and format.

Request Body

ParameterTypeDescription
pdf_base64StringThe PDF file encoded as base64.
qualityENUMImage quality for the converted pages. Allowed values: low, medium, high, ultra. Default: medium.
img_formatENUMOutput image format. Allowed values: jpg, png. Default: jpg.

Response

Returns a JSON object with a download_url string field containing a URI to download the generated images archive.

ParameterTypeDescription
download_urlStringA URI where the converted images archive can be downloaded.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.