PDF to Images Retrieve API
Download the converted page images as a ZIP file once the status API reports processed.
| Endpoint | /pdf-to-images-retrieve |
| URL | https://llmwhisperer-api.us-central.unstract.com/api/v2/pdf-to-images-retrieve |
| Method | GET (HEAD is also supported — see below) |
| Headers | unstract-key: <YOUR API KEY> |
Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
| whisper_hash | string | Yes | The whisper_hash returned when the conversion job was submitted. |
Example Curl Request
curl -X GET --location 'https://llmwhisperer-api.us-central.unstract.com/api/v2/pdf-to-images-retrieve?whisper_hash=XXXXXXXXXXXXXXXXXXX' \
-H 'unstract-key: <Your API Key>' \
--output pages.zip
Response
| HTTP Status | Content-Type | Headers | Description |
|---|---|---|---|
| 200 | application/zip | Content-Disposition: attachment; filename="<whisper_hash>.zip", Content-Length | The result ZIP, streamed. |
| 400 | application/json | Job not ready, result already retrieved, retrieval already in progress, conversion error, or result expired. Refer below. | |
| 404 | application/json | Job unknown. |
ZIP contents
One image per page, named with three-digit zero-padded sequential numbers in page order:
page_001.png
page_002.png
page_003.png
...
The extension is .png or .jpeg depending on the format the job was submitted with.
Example 400 Responses
{ "message": "Job not ready: Converting page 2 of 4" }
{ "message": "Result already retrieved" }
{ "message": "Result not found in storage. Expired?" }
One-time retrieval
The result can be retrieved only once. After a successful download the job status flips to retrieved and further attempts return 400. Make sure to store the images in your system if you need to access them multiple times. This behaviour can be controlled in on-prem installations with the RESULT_PERSISTENCE setting.
Two concurrent downloads of the same result are also prevented: while one download is streaming, a second request returns 400 (Retrieval already in progress for this whisper hash).
Result retention
Converted results are kept for 2 hours after the conversion completes, then deleted automatically. A retrieve attempt after expiry returns 400 (Result not found in storage. Expired?). On-prem deployments can override the window with the PDF_TO_IMAGES_RESULT_TTL setting (seconds).
HEAD requests
A HEAD request returns the response headers (including Content-Length) without consuming the one-time retrieval, so you can inspect the result size before committing to the download.