Screenshot API
Response headers
Every image from thumbs.php carries headers that say what you received.
The headers
| Header | Meaning |
|---|---|
| X-PP-Error | True if there was an error, otherwise False. |
| X-PP-Error-Message | Why the request was refused. Only on refused requests. |
| X-PP-Timestamp | When the file served was made, as a Unix timestamp. |
| X-PP-Capture-Time | How long the capture took, in seconds. |
| X-PP-Final-URL | Where the URL ended up after redirects. |
| X-PP-Capture-Method | The engine label, for support. |
| X-PP-Hash | A hash of the URL, for support. |
HTTP/1.1 200 OK
Content-Type: image/jpeg
X-PP-Error: False
X-PP-Timestamp: 1793534000
X-PP-Capture-Time: 3.21
X-PP-Final-URL: https://example.org/
Which ones you get
X-PP-Error comes with every image. X-PP-Timestamp comes with everything except a refused request's image.
X-PP-Capture-Time, X-PP-Final-URL, X-PP-Capture-Method and X-PP-Hash are written by the render, so they only come with a real capture, not with a placeholder.
Caching
Responses carry Cache-Control: no-cache, no-store, must-revalidate. Every request counts as an API call, so if you use an image more than once, keep your own copy.