API Documentation

https://api.pdf-image.net/convert

🔐 API Key Required

ALL requests to this API MUST include a valid API key as a query parameter.

Without an API key, requests will be rejected with a 401 Unauthorized error.

?api_key=pk_live_abc123...def789

Generate your free API key below with one click. Start with 3 free conversions!

Generating your API key...

Converts a PDF accessible via a URL into one or more images. Returns a single image if the PDF has only one page, or a ZIP file if it contains multiple pages. Requires API key authentication.

Endpoint

GET https://api.pdf-image.net/convert

Description

This endpoint allows you to download a PDF from a URL, convert its pages to images in various formats (png, jpg, jpeg, webp, tiff), and return the result as either a single image or a ZIP file containing multiple images.

Parameters

NameTypeRequiredDescription
api_keyQuery StringREQUIREDYour API key - MANDATORY for all requests
Format: pk_live_abc123...def789
urlstringRequiredURL of the PDF file to download
formatstringOptionalOutput image format. Valid values: png, jpg, jpeg, webp, tiff. Default: png
outputstringOptionalOutput type. Valid values: image or zip. Default: image
qualityintegerOptionalQuality/compression. Range: 1 to 100. Default: 90

Important Behavior

⚠️ If the PDF has more than one page and output=image, an error will be returned.

This ensures that all pages are properly converted and can be downloaded in a single response.

💡 Pro Tip for API Developers

If you're building an API and don't know whether the PDF will have one or multiple pages, always use output=zip. This way you don't need to duplicate logic in your code to handle both single images and ZIP files - you'll always receive a ZIP file that you can process consistently.

Usage Examples

Convert a single-page PDF to PNG

GET https://api.pdf-image.net/convert?api_key=pk_live_abc123...def789&url=https://example.com/file.pdf&format=png&output=image
  • If the PDF has 1 page, a PNG image will be returned
  • If the PDF has more than one page, an error will be returned

Convert a multi-page PDF to JPG in a ZIP

GET https://api.pdf-image.net/convert?api_key=pk_live_abc123...def789&url=https://example.com/file.pdf&format=jpg&output=zip
  • Returns a ZIP file with images page_1.jpg, page_2.jpg, etc.

Control image quality

GET https://api.pdf-image.net/convert?api_key=pk_live_abc123...def789&url=https://example.com/file.pdf&format=webp&quality=80
  • Applies 80% quality to the webp images

Error Codes

CodeDescription
400The PDF could not be downloaded or parameters are invalid
400If output is image and the PDF has more than one page
500Internal server error (issues converting or saving images)

Response Types

If output=image and PDF has 1 page:

  • Type: image/png, image/jpeg, etc.
  • File: output.{format}

If output=zip or PDF has multiple pages:

  • Type: application/zip
  • File: output_images.zip (with multiple files page_1.{ext}, page_2.{ext}, etc.)