AI API · Web Screenshot
Web Screenshot
https://ai.sneakypeekai.com
Capture a full-page screenshot of a public URL as an image. A successful capture always returns the image, including login screens and cookie banners. Query parameters take precedence over body fields when both are set. You may send optional proxy, user_agent, and viewport in the JSON body or as query parameters.
Uses 3 credits plus 1 request from your per-minute and daily caps.
Authentication
Authenticate requests by sending your API key in the X-API-Key HTTP request header.
Mint and manage API keys in your Sneaky Peek AI Account → API Keys.
X-API-Key: $API_KEY
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
X-API-Key |
header | string |
yes | Your API key. Missing or wrong key returns 401. |
url |
query | string |
yes | Public web page address (http or https). Also accepted in the JSON body. Query parameter takes precedence over body field. |
proxy |
body | string |
no | Optional proxy URL for this request. Also accepted as a query parameter. |
user_agent |
body | string |
no | Optional browser user agent for this request. userAgent is also accepted. Also accepted as a query parameter. Leave out to use the current desktop browser user agent. |
viewport |
body | object or string |
no | Optional size as {"width":1920,"height":1080} in the body, or 1920x1080 as a query parameter. |
full_page |
body | boolean |
no | Set true for a full-page capture. Also accepted as a query parameter. Default is true. |
Request Example (curl)
curl -X POST "https://ai.sneakypeekai.com/get_screenshot?url=https://example.com" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Success Response Example (200 OK)
{
"status": 200,
"screenshot_base64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
Common Error Status Codes
| Status Code | When / Description |
|---|---|
400 |
The page address is missing or is not a public http or https site. |
401 |
The API key is missing or invalid. |
402 |
Insufficient credits for this call. |
413 |
The screenshot is larger than the allowed size. |
411 |
The HTTP Content-Length header is completely missing from the request. |
429 |
You hit a rate or daily limit. Wait for the retry time in the response headers. |