Synchronous capture
curl --request POST \
--url https://api.example.com/api/screenshotimport requests
url = "https://api.example.com/api/screenshot"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/screenshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/screenshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/screenshot"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/screenshot")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/screenshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyAPI Reference
Synchronous capture
Capture an image, PDF, HTML document, or WebM recording in one request
POST
/
api
/
screenshot
Synchronous capture
curl --request POST \
--url https://api.example.com/api/screenshotimport requests
url = "https://api.example.com/api/screenshot"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/screenshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/screenshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/screenshot"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/screenshot")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/screenshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySynchronous capture
Send an API key inx-api-key or Authorization: Bearer …. The response is the
requested binary body unless account storage delivery is requested.
Core fields
| Field | Type | Bounds / values |
|---|---|---|
url | URL | Required; HTTP(S), max 2,048 characters; private networks are rejected |
format | string | png, jpeg, webp, pdf, html, or webm |
device | string | desktop, laptop, tablet, or mobile |
width, height | integer | 320–3,840 × 240–3,840 |
fullPage | boolean | Capture the entire rendered page |
delay | integer | 0–10,000 milliseconds |
selector | string | Capture one matching element |
waitForSelector | string | Wait up to ten seconds for an element |
blockAds, darkMode, stealth | boolean | Rendering controls |
videoDuration | integer | 1–15 seconds; used only for WebM |
proxyRegion | string | us, eu, or apac; requires a configured Scale proxy |
selector, clip, or a device mockup.
The complete bounds and nested options are authoritative in /api/openapi.json
and src/lib/api/screenshot-schema.ts.
Responses
200: capture completed.X-Screenshot-Duration,X-Screenshot-Size, and quota headers are included.400: invalid, unsafe, or incompatible input.401: missing, expired, revoked, or invalid API key.403: the workspace owner’s plan does not include a requested feature.413: request body exceeds 64 KiB.429: monthly allowance or per-minute throughput was exceeded.503: a requested optional adapter, such as a regional proxy, is not configured.