GET
Capture a web page
https://ai.mihajlo.mk/api/screenshot-api/v1/captureReturns the rendered page directly as image/png. Quota information and cache state are exposed through response headers.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | A complete public HTTP or HTTPS URL. |
w | integer | No | Viewport and output width in pixels. |
h | integer | No | Fixed output height. Leave empty for a full-page capture. |
device | string | No | Desktop viewport or mobile Chrome emulation. |
cache | boolean | No | False creates a fresh screenshot and replaces the cached PNG. |
cURL example
curl --request GET \
--header "Authorization: Bearer {serviceTokenHere}" \
"https://ai.mihajlo.mk/api/screenshot-api/v1/capture?w=1600&h=955&device=desktop&cache=1&url=https%3A%2F%2Fexample.com%2F"
Example response
{
"content_type": "image/png",
"headers": {
"X-Screenshot-Cache": "HIT",
"X-Screenshot-URL": "https://ai.mihajlo.mk/storage/screenshot-api/{cache-key}.png?v={content-hash}",
"X-Quota-Remaining": "1996"
}
}