Transform PDF documents into high-quality images with our comprehensive PDF to Image conversion APIs. Convert PDFs to JPG, PNG, TIFF, BMP, and GIF formats with precise control over resolution, color profiles, and page selection. Whether you need to generate thumbnails for document previews, create high-resolution images for print workflows, or extract specific PDF pages as images for web display, our APIs handle it all with exceptional speed and reliability.
Set resolution from 20 to 1200 DPI, choose from multiple color profiles including grayscale, RGB, RGBA, CMYK, and specialized formats like 1-bit black & white, convert specific page ranges, and handle files up to 1GB in size. Select exactly which pages to convert using flexible syntax, apply image smoothing for enhanced quality, and control color profiles for optimal file sizes.
Perfect for document management systems generating preview images, publishing platforms creating thumbnails, archival services digitizing records, e-learning applications displaying course materials, and SaaS applications requiring on-demand PDF page rendering. With asynchronous request processing and webhook support, you can seamlessly integrate PDF to image conversion into your automation workflows.
Convert PDFs to five popular image formats: PNG, JPG, TIFF, BMP, and GIF. Each format is optimized for different workflows, from web thumbnails and transparent graphics to professional print preparation and legacy system compatibility.
Configure output resolution from 20 to 1200 DPI to meet any quality requirement. Whether you're optimizing for web performance, archival storage, or high-resolution print production, precise DPI control ensures your images match your exact specifications.
Balance image quality against file size with granular compression settings. JPG quality levels from 1-100, indexed color palettes for reduced file sizes, and format-specific optimizations give you complete control over output characteristics without sacrificing visual fidelity.
Support for multiple color spaces including monochrome, grayscale, RGB, RGBA with transparency, and CMYK for print. Select the optimal color profile based on your output medium and file size requirements.
Convert PDFs with specialized color spaces for professional workflows. Support for CMYK print-ready output and indexed color palettes (4-bit, 8-bit) for optimized file sizes without compromising visual quality.
Extract specific pages, ranges, or entire documents with flexible selection syntax. Support for individual pages, continuous ranges, combined selections, and special keywords like "odd", "even", "last", and "all" for precise control over conversion output.
Enhance output quality with configurable anti-aliasing controls. Apply smoothing globally or selectively to text, lines, and images to eliminate jagged edges and improve visual clarity while maintaining processing speed and file efficiency.
If you don't want to poll for task status, you can simply provide the webhook data in your request. Instead of manually checking status, we will automatically notify your endpoint the moment the task processing is completed.
destroy parameter, your files are permanently wiped from our servers immediately after processing finishes, ensuring complete data security. If destroy is not set, files are retained up to 30 days based on user's plan.Handle heavy documents and high-resolution assets with ease. Our API supports a massive 1GB payload size per request, allowing you to process even the largest PDF files without worrying about size restrictions.
Note: The output zip file and task status is only retained up to a 1 day at max for PDF to Image APIs
Select an image format to view its specific endpoint, parameters, and examples:
$ pip install requests
All PDF to image endpoints accept the same common parameters with additional format-specific controls for color profiles and quality.
File uploads must use multipart/form-data format. PDF API accepts a single file upload.
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| file | No | multipart/form-data | - | The PDF file to process. Only used if you're uploading a file instead of using file_id. |
Input Priority Rule:
If both file and file_id are provided, the multipart file upload takes priority and file_id is ignored.
These parameters are supported by all PDF to image endpoints. All parameters must be included as query parameters.
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| file_id | No | String | - | The unique ID of a PDF file already present on our server. Use this instead of uploading the file again. |
| output | No | String | pdf_to_{format} | Name of the output zip file (without extension) containing all generated images. Format can either be png, jpg, tif, bmp or gif. |
| destroy | No | Boolean | false | If true, we delete the input file immediately after generating the output images. |
| resolution | No | int | 150 (100 for GIF) | Output image resolution in DPI. Acceptable range: 20 to 1200. Higher values produce sharper images but larger file sizes. Default value for pdf to gif is 100. |
| image_smoothing | No | String | none | Anti-aliasing options to apply during conversion. Valid values: none, all, or comma-separated combination of text, line, and image (e.g., "text,line"). |
| pages | No | String | all | Specify the pages to be converted to image format from the PDF. Provide individual page numbers and/or ascending page ranges (e.g., 1, 3-5, 7). Use commas to separate entries and hyphens for ranges. Any duplicate pages will be removed, while preserving the original page order. You may instead provide only one of the special keywords: • even — converts all even-numbered pages • odd — converts all odd-numbered pages • last — converts only the last page • all — converts all pages Examples: ✓ "1,4-2,last" ✓ "odd" ✓ "all" ✗ "1,odd" (invalid) Note: Mixing special keywords with specific pages/ranges is not allowed. |
Endpoint: https://api.apifreaks.com/v1.0/pdf/jpg
Best For: Photographs, small file sizes, general viewing
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| profile | No | String | rgb | Specifies the color profile for the output JPG images. Acceptable values: • gray – 8-bit grayscale. • rgb – 24-bit RGB color (default). • cmyk – 32-bit CMYK color, commonly used for print workflows. |
| quality | No | int | 70 | Controls JPG compression quality. Higher values yield sharper images with larger file sizes. Acceptable range: 1 to 100. |
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| webhook_url | No | String | - | The URL where we'll send the webhook notification after the task completes. Authentication parameters in the URL (e.g., ?auth=token123) are passed as-is. |
| webhook_failure_notification | No | Boolean | false | If true, we'll send an email notification if the webhook request fails after 3 retries. The email goes to the requesting user or their org admin if user is part of an organization. |
| Header | Required | Type | Default | Description |
|---|---|---|---|---|
| X-Webhook-Authorization | No | String | - | Custom authorization header sent with the webhook request. Format: Key:Value (e.g., Authorization:Bearer token123). |
Explore detailed response fields including field names, data types, requirements, and descriptions in the interactive Response Table below. For complete response documentation click here.
Use these endpoints to manage files and check task status.
task_id. The response includes creation and expiry timestamps to help you track result availability, along with specific error details if a task fails. Results are retained for up to 7 days, depending on the operation.file_id. Returns details including file name, size, type, and creation/deletion timestamps. Generated or uploaded files are retained up to 30 days based on user's plan, unless destroy is enabled to delete them immediately. You can use this endpoint to check if the file has expired using its file_id.multipart/form-data request. Each file receives a unique file_id that can be used with the PDF APIs.file_id for uses with the PDF APIs.All PDF to Image endpoints return consistent error codes:
| HTTP Status | Reasons |
|---|---|
| 400 | Invalid PDF File: Please provide a valid PDF file. We don't support other types. |
| 400 | Missing File or ID: You must provide either a file or a file ID. |
| 400 | Invalid Parameter: The value for 'param_name' is invalid. |
| 404 | File ID Not Found: Please provide a valid file ID. |
| 500 | File Saving Exception: An unknown error occurred while saving. Try again later. |
| 500 | Internal Server Error: Internal Server Error Occurred. |
| 400 | Invalid Image Profile: Please provide a valid image profile. Refer to the documentation for valid profiles. |
| 400 | Invalid Image Smoothing: Please provide a valid smoothing option or combination. Refer to the documentation for valid options. |
| 400 | Invalid Image Resolution: Please provide a valid image resolution (DPI). Refer to the documentation for valid resolution values. |
| 400 | Invalid Image Quality: Please provide a valid image quality value from 1 to 100. (JPG only) |
These errors might appear in the task-status response if the background job fails.
| Error | Description |
|---|---|
Invalid PDF File | The provided file is not a valid PDF file. |
File Saving Exception | An unknown error occurred while saving the file. Try again later. |
PDF Generation Exception | An unknown error occurred while generating the PDF. Try again later. |
Internal Server Error | Internal Server Error Occurred. |
Invalid File ID Provided | Please provide a valid file ID. |
Encrypted PDF Provided | The provided PDF file is encrypted. Please decrypt it first to perform operations. |
Invalid Image Profile | Please provide a valid image profile. Refer to the documentation for valid profiles. |
Invalid Page Range | One or more specified page numbers exceed the total number of pages in the PDF document. |
Invalid Page Number Format | The provided page number format is invalid. Refer to the documentation for valid page number formats. |
Use this quick reference to tune the API parameters for your specific needs.
Resolution (resolution):
Color Profiles (profile):
JPG Quality (quality):
Image Smoothing (image_smoothing):
Follow these examples to convert PDF files to images using different formats and configurations. Choose the format and settings that best match your use case.
1. High-Quality Web & Display Assets (JPG & PNG)
Use these examples to generate crisp images for websites, apps, or emails.
quality=85 and resolution=150 for sharp text without bloating the file size.profile=rgba to preserve transparency and image_smoothing=text to ensure crisp fonts on any background.Example 1: Web-Ready JPG (Balanced Quality)
# Standard Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/jpg?resolution=150&quality=85&profile=rgb&output=web_images' \ -H 'X-apiKey: YOUR_API_KEY' \ -F 'file=@/path/to/brochure.pdf'
Example 2: Transparent PNG (Selected pages only)
# Standard Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/png?pages=1,5-8&profile=rgba&image_smoothing=text&output=transparent_assets' \ -H 'X-apiKey: YOUR_API_KEY' \ -F 'file=@/path/to/design_draft.pdf'
2. Professional Print & Archival Scans (TIFF & BMP)
Use these configurations for enterprise workflows, physical printing, or fax archives.
cmyk color profile and maximum 600 DPI resolution, required for offset printing.bw). This creates extremely small files perfect for faxing or long-term database storage.Example 1: Print-Ready TIFF (CMYK, 600 DPI)
# Standard Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/tif?resolution=600&profile=cmyk&image_smoothing=all&output=print_master' \ -H 'X-apiKey: YOUR_API_KEY' \ -F 'file=@/path/to/marketing.pdf'
Example 2: B&W Document Scan (Smallest size for Archiving)
# Response with destroy=true (No File IDs as they are deleted right away) { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d" }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/bmp?resolution=300&profile=bw&image_smoothing=text&output=archive_scan&destroy=true' \ -H 'X-apiKey: YOUR_API_KEY' \ -F 'file=@/path/to/invoice.pdf'
3. Thumbnails & Low-Bandwidth Previews (GIF)
Use this configuration to generate lightweight thumbnails or simple previews that load instantly on slower connections.
resolution=72 (standard screen DPI) and profile=8-bit (256 colors) to keep the file size extremely small while maintaining readability for large headers and diagrams.Example: Generate Lightweight Thumbnails (First Page Only)
# Standard Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/gif?pages=1&resolution=72&profile=8-bit&output=thumbnail_preview' \ -H 'X-apiKey: YOUR_API_KEY' \ -F 'file=@/path/to/report.pdf'
destroy=true (as seen in the Print example) deletes the input file immediately, so no inputIds are returned in the response.file_id from the inputIds array to process the same file again (e.g., creating a thumbnail after a high-res conversion) without re-uploading.After submitting a pdf to image conversion task, check its progress using the Task Status API with your taskId. The task goes through these statuses: queued, processing, completed, and failed. Monitor your task to know when the image task has finished and images are ready for download.
# Response (completed) { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "status": "completed", "createdAt": "2026-01-26 13:30:00", "zipFileUrl": "https://api.apifreaks.com/v1.0/pdf/resource/download?resource_id=9b2e7f3a-5c8d-4e1b-a6f9-0d3c8e7b2a5f", "zipFileId": "9b2e7f3a-5c8d-4e1b-a6f9-0d3c8e7b2a5f", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ], "expiresAt": "2026-01-26 23:59:59" } # Response (failed) { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "status": "failed", "createdAt": "2025-01-26 10:30:00", "inputIds": [ "566dc743-d8fe-4943-8cef-61e5d3d6096c" ], "error": "Invalid PDF File", "message": "The provided file is not a valid PDF file.", "expiresAt": "2025-01-27 10:30:00" }curl -X 'GET' \ 'https://api.apifreaks.com/v1.0/pdf/task-status?task_id=04a06cd5-158d-4191-a45b-6f58249c599d' \ -H 'X-apiKey: YOUR_API_KEY'
Once the task status shows "completed", download your converted images as a zip file using the File Download API. The zip contains one image file per converted page, named sequentially.
curl -X 'GET' \ 'https://api.apifreaks.com/v1.0/pdf/download?resource_id=9b2e7f3a-5c8d-4e1b-a6f9-0d3c8e7b2a5f' \ -H 'X-apiKey: YOUR_API_KEY' \ -o high_quality_images.zip
Get automatic notifications when your task completes instead of polling the task status endpoint. Good for event-driven applications and real-time document processing.
Add webhook_url to your request. We'll send a POST request to this URL when the task finishes (either completed or failed).
Example Request:
# Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "566dc743-d8fe-4943-8cef-61e5d3d6096c" ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/jpg?webhook_url=https://yourdomain.com/webhook/pdf-to-jpg&webhook_failure_notification=true&resolution=150&quality=85&profile=rgb&output=web_images' \ -H 'X-apiKey: YOUR_API_KEY' \ -F 'file=@/path/to/file.pdf'
Webhook delivery will be attempted up to 3 times. If all retries fail and webhook_failure_notification is enabled, we'll send an email notification to the requesting user or their organization admin.
Use X-Webhook-Authorization to add a custom header to webhook requests for endpoint security.
Format: Key:Value
Example: If you send Authorization:Bearer token123, the webhook request will include: Authorization: Bearer token123
Example with custom authorization:
curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/jpg?webhook_url=https://yourdomain.com/webhook/pdf-to-image&webhook_failure_notification=true' \ -H 'X-apiKey: YOUR_API_KEY' \ -H 'X-Webhook-Authorization: Authorization:Bearer token123' \ -F 'file=@/path/to/document.pdf'
When your task completes, we send a POST request to your webhook_url with these headers:
| Header | Description | Example |
|---|---|---|
Content-Type | Always application/json | application/json |
X-Signature | HMAC-SHA256 signature of the request body using your API key. Use this to verify the payload is authentic. | 4a7d1ed414474e4033ac29ccb8653d9b |
| Custom Header | (If provided) Your custom header from X-Webhook-Authorization | Authorization: Bearer token123 |
The webhook payload contains the same response structure as the Task Status API endpoint when checked for the task ID. For a comprehensive view of the webhook response structure and detailed field descriptions, explore the interactive Response Table.
Use the X-Signature header to verify webhook requests actually came from API Freaks and weren't tampered with.
How the signature works:
X-Signature header valueTo verify the webhook:
X-Signature header valueImportant: Don't transform or process the raw request body before verification. Adding whitespace or other formatting creates a different signature and verification will fail.
To use the PDF to Image APIs, API credits are required. Charges apply only for successful queries, defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be refunded.
For each successful request, 200 credit will be charged per page. 1 extra credit will be charged per MB beyond 50 MB.
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.