Include your API key in the Authorization header:
Authorization: Bearer sk_your_api_key
Get your API key by registering for free.
Capture a screenshot of any URL. Returns the image binary directly.
| Param | Type | Default | Tier | Description |
|---|---|---|---|---|
url | string | — | All | URL to capture (required) |
width | number | 1280 | All (custom sizes: Starter+) | Viewport width in pixels |
height | number | 720 | All (custom sizes: Starter+) | Viewport height in pixels |
format | string | png | png: All, jpeg: Starter+ | Output format: png or jpeg |
quality | number | 80 | Starter+ | JPEG quality (1-100). Only applies when format is jpeg. |
fullPage | boolean | false | Starter+ | Capture the full scrollable page |
darkMode | boolean | false | Starter+ | Render page in dark mode (prefers-color-scheme: dark) |
deviceScaleFactor | number | 1 | 1x: All, 2x: Pro+, 3x: Business | Device pixel ratio for Retina rendering (1, 2, or 3) |
hideCookieBanners | boolean | false | All | Auto-hide cookie consent banners |
blockAds | boolean | false | Pro+ | Block ads before capture |
cssInject | string | — | Pro+ | Custom CSS to inject before capture |
delay | number | 0 | Pro+ | Wait this many milliseconds before capture (max 10000) |
selector | string | — | Starter+ | CSS selector — capture only that element |
webhookUrl | string | — | Pro+ | URL to POST the result to when capture is complete |
headers | object | — | Business | Custom HTTP headers to send with the page request |
curl -X POST https://snap.alldevbox.com/api/v1/screenshot \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com", "width": 1920, "height": 1080}' \
--output screenshot.png
import requests
r = requests.post('https://snap.alldevbox.com/api/v1/screenshot',
headers={'Authorization': 'Bearer sk_your_api_key'},
json={
'url': 'https://github.com',
'width': 1920,
'height': 1080,
'fullPage': True, # Starter+
'darkMode': True, # Starter+
'blockAds': True, # Pro+
'deviceScaleFactor': 2 # Pro+ (2x Retina)
})
with open('screenshot.png', 'wb') as f:
f.write(r.content)
const fs = require('fs');
const res = await fetch('https://snap.alldevbox.com/api/v1/screenshot', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://github.com',
format: 'jpeg',
quality: 90,
hideCookieBanners: true
})
});
const buffer = Buffer.from(await res.arrayBuffer());
fs.writeFileSync('screenshot.jpg', buffer);
$ch = curl_init('https://snap.alldevbox.com/api/v1/screenshot');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer sk_your_api_key',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://github.com',
'width' => 1920,
'height' => 1080
])
]);
$image = curl_exec($ch);
curl_close($ch);
file_put_contents('screenshot.png', $image);
Render raw HTML as a screenshot. Same parameters as above, but replace url with html.
curl -X POST https://snap.alldevbox.com/api/v1/screenshot/html \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello World</h1>"}' \
--output screenshot.png
Generate a PDF from any URL.
| Param | Type | Default | Description |
|---|---|---|---|
url | string | — | URL to capture (required) |
format | string | A4 | Page size: A4, Letter, Legal, Tabloid |
landscape | boolean | false | Landscape orientation |
printBackground | boolean | true | Print background graphics |
margin | object | — | {top, right, bottom, left} in CSS units |
curl -X POST https://snap.alldevbox.com/api/v1/pdf \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "A4"}' \
--output page.pdf
Generate a PDF from raw HTML.
curl -X POST https://snap.alldevbox.com/api/v1/pdf/html \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Invoice #1234</h1><p>Amount: £99.00</p>"}' \
--output invoice.pdf
Capture screenshots across all devices in a single request. Returns a ZIP archive containing one screenshot per device.
| Param | Type | Default | Description |
|---|---|---|---|
url | string | — | URL to capture (required) |
format | string | png | Output format for all screenshots |
devices | array | all | Optional array of device keys to capture (omit for all) |
curl -X POST https://snap.alldevbox.com/api/v1/batch \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' \
--output screenshots.zip
Check your current usage and plan details.
curl https://snap.alldevbox.com/api/v1/usage \
-H "Authorization: Bearer sk_your_api_key"
# Response:
# {"tier":"free","used":42,"limit":100,"remaining":58}
Get detailed information about your tier's features and allowed devices.
curl https://snap.alldevbox.com/api/v1/tier-info \
-H "Authorization: Bearer sk_your_api_key"
# Response:
# {
# "tier": "starter",
# "features": {
# "jpeg": true, "fullPage": true, "darkMode": true,
# "pdf": true, "customDelay": false, "cssInject": false,
# "blockAds": false, "webhooks": false, "batch": false
# },
# "maxDeviceScaleFactor": 1,
# "allowedDevices": ["1920x1080", "412x915", "430x932", ...],
# "allDevices": { "1920x1080": "Full HD", ... }
# }
Submit long-running captures as async jobs.
# Submit job
curl -X POST https://snap.alldevbox.com/api/v1/jobs \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "screenshot", "url": "https://example.com"}'
# {"jobId":"...","status":"queued"}
# Check status
curl https://snap.alldevbox.com/api/v1/jobs/JOB_ID \
-H "Authorization: Bearer sk_your_api_key"
# Download result
curl "https://snap.alldevbox.com/api/v1/jobs/JOB_ID?download" \
-H "Authorization: Bearer sk_your_api_key" --output result.png
| Plan | Screenshots/mo | Devices | Scale | Key Features |
|---|---|---|---|---|
| Free $0 | 100 | 2 | 1x | PNG, cookie blocking |
| Starter $12 | 1,000 | All mobile & tablet | 1x | + JPEG, full page, PDF, dark mode, custom resolution |
| Pro $39 | 10,000 | All + 4K | 2x | + Ad blocking, CSS injection, delay, webhooks |
| Business $99 | 100,000 | All + 4K | 3x | + Batch capture, custom headers, priority support |
All error responses return JSON with an error field.
| Code | Meaning | Example |
|---|---|---|
400 | Invalid request | {"error": "url is required"} |
401 | Invalid or missing API key | {"error": "Invalid API key"} |
403 | Feature not available on your plan | {"error": "CSS injection requires Pro plan or above"} |
429 | Monthly limit reached | {"error": "Monthly capture limit reached (100/100)"} |
500 | Server error | {"error": "Page failed to load"} |
When you use a feature not available on your plan, you'll get a 403 with a clear message about which plan is required:
# Example: Free tier user trying JPEG format
curl -X POST https://snap.alldevbox.com/api/v1/screenshot \
-H "Authorization: Bearer sk_free_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "jpeg"}'
# HTTP 403
# {"error": "JPEG format requires Starter plan or above"}