Back to Screenshot API

API documentation

Screenshot API

Send a URL, viewport and device type. The service validates the destination, renders it in a fresh headless Chrome profile, removes common consent overlays, and returns a PNG with cache and quota headers.

Current planFree200 requests per month

Quota

Free usage

Used0
Remaining200
Limit200
Resets at 2026-08-31 23:59:59.

Authentication

Bearer token

Authorization: Bearer {serviceTokenHere}

For compatibility with simple image tags and legacy clients, ?token=... and the X-API-Token header are also accepted.

GET

Capture a web page

https://ai.mihajlo.mk/api/screenshot-api/v1/capture

Returns the rendered page directly as image/png. Quota information and cache state are exposed through response headers.

ParameterTypeRequiredDescription
urlstringYesA complete public HTTP or HTTPS URL.
wintegerNoViewport and output width in pixels.
hintegerNoFixed output height. Leave empty for a full-page capture.
devicestringNoDesktop viewport or mobile Chrome emulation.
cachebooleanNoFalse 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"
    }
}

Live tester

Login to run live requests. All endpoint documentation remains public.

Login to test

Errors

Standard error envelope

{
  "ok": false,
  "error": "invalid_request",
  "message": "Human-readable explanation"
}

Common statuses: 401 invalid token, 422 invalid parameters, 429 quota used, and 502 upstream or capture failure.