/v1/pdf-to-image
Convert PDF pages into JPG, PNG, or WEBP output.
Tool Usage Notes
Accepts one or multiple PDF URLs.
If output is exactly one image, you get a single image file.
If output has multiple images/pages, you get a ZIP file.
When multiple input PDFs are provided, ZIP keeps files grouped by input file.
If output is exactly one image, you get a single image file.
If output has multiple images/pages, you get a ZIP file.
When multiple input PDFs are provided, ZIP keeps files grouped by input file.
Estimate Before Processing
Use the estimate endpoint to preview token cost and validate your input URLs before starting conversion.
curl -X POST https://filemazing.com/v1/pdf-to-image/estimate \
-H "Authorization: Bearer fm_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["https://example.com/file"],
"response_type": "json"
}'
{
"ok": true,
"tool": "pdf-to-image",
"mode": "estimate",
"estimated_tokens": 1,
"available_tokens": 10,
"enough_tokens": true,
"shortfall_tokens": 0
}
Example Request
Provide PDF URL(s) and choose output image format.
curl -X POST https://filemazing.com/api/v1/pdf-to-image \
-H "Authorization: Bearer fm_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["https://example.com/document.pdf"],
"output_format": "jpg",
"response_type": "json"
}'
Request Parameters Breakdown
| Parameter | Required | Type | Options | Default | Example |
|---|---|---|---|---|---|
| inputs | Yes | array<string> | HTTP/HTTPS URL(s) to PDF files |
none (required)
|
["https://example.com/document.pdf"]
|
| Provide one or more PDF URLs. Duplicate URLs are ignored. | |||||
| output_format | Yes | string |
jpg, png, webp
|
none (required)
|
jpg
|
| Choose the target image format for extracted pages. | |||||
| response_type | No | string |
json, xml, text
|
json
|
json
|
| Controls API response payload format. | |||||
| promo_code | No | string | Any active promo code |
empty
|
SPRING25
|
| Optional; applies discount rules when valid. | |||||
Example Response
Successful conversion returns download URL and token usage.
{
"ok": true,
"tool": "pdf-to-image",
"mode": "sync",
"status": "completed",
"download_url": "https://filemazing.com/tool/pdf-to-image/jobs/.../download",
"estimated_tokens": 1,
"final_tokens": 1
}
Response Fields Breakdown
| Field | Type | Always Returned | Example |
|---|---|---|---|
| ok | boolean | Yes |
true
|
| Indicates whether the request completed successfully. | |||
| tool | string | Yes |
pdf-to-image
|
| Tool identifier used by this endpoint. | |||
| mode | string | Yes |
sync
|
| Current API execution mode. | |||
| status | string | Yes |
completed
|
| Job state at response time. | |||
| estimated_tokens | integer | Yes |
3
|
| Estimated tokens reserved before processing. | |||
| final_tokens | integer | Yes |
3
|
| Final tokens charged after completion. | |||
| download_url | string | Yes |
https://filemazing.com/tool/pdf-to-image/jobs/.../download
|
| Direct URL to download result file (single file or ZIP). | |||