Base URL
https://snap.i2dev.comAuthentication
Pass your API key using either header:
Authorization: Bearer YOUR_API_KEYor
x-api-key: YOUR_API_KEYPOST /v1/screenshots
Captures a screenshot of a URL (synchronous). Returns an imageUrl plus metadata.
Example request (copy/paste)
curl -sS -X POST https://snap.i2dev.com/v1/screenshots -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"url": "https://example.com",
"format": "png",
"fullPage": false,
"viewport": { "width": 1280, "height": 720 },
"waitUntil": "load"
}'Example response
{
"jobId": "...",
"request_id": "...",
"imageUrl": "https://snap.i2dev.com/_local/jobs/...png",
"contentType": "image/png",
"bytes": 12345,
"durationMs": 987,
"logs": [],
"page_errors": []
}Async mode (for long renders)
Set "async": true in the POST /v1/screenshots body to queue the render and return immediately. Then poll GET /v1/jobs/:id for status.
Async submit example
curl -sS -X POST https://snap.i2dev.com/v1/screenshots -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"url": "https://example.com",
"format": "png",
"async": true
}'Async submit response
{
"jobId": "...",
"request_id": "...",
"status": "queued",
"statusUrl": "https://snap.i2dev.com/v1/jobs/..."
}Poll job status
curl -sS -H "Authorization: Bearer YOUR_API_KEY" https://snap.i2dev.com/v1/jobs/JOB_IDJob status response (done)
{
"jobId": "...",
"status": "succeeded",
"result": {
"imageUrl": "https://snap.i2dev.com/_local/jobs/...png",
"contentType": "image/png",
"bytes": 12345,
"durationMs": 987
}
}Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to screenshot (public http/https only; SSRF protections enabled). |
format | "png" | "jpeg" | No | Default: png |
fullPage | boolean | No | Capture full scrollable page. Default: false |
viewport | { width, height } | No | Default: {"width":1280,"height":720} |
waitUntil | "load" | "domcontentloaded" | "networkidle" | No | Default: load |
waitForSelector | string | No | Wait for a CSS selector before capturing. |
timeoutMs | number | No | Overall render timeout (bounded by server max). |
navTimeoutMs | number | No | Navigation timeout (bounded by server max). |
timezoneId | string | No | Example: America/Toronto |
locale | string | No | Example: en-US |
extraHTTPHeaders | object | No | Extra request headers (string → string). |
cookies | array | No | Cookies to set before navigation. |
async | boolean | No | Queue render and return immediately (requires async mode enabled). |
Errors
Errors are returned as JSON and include a request_id. Include that ID when reporting issues.
{
"error": "Invalid or missing API key",
"code": "unauthorized",
"request_id": "..."
}Common HTTP status codes:
400bad_request / unsafe_url401unauthorized429rate_limited / too_many_inflight500internal_server_error