curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/screenshot' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"format": "png",
"quality": 85,
"region": {
"x": 1,
"y": 1,
"width": 1,
"height": 1
}
}'
{
"image": "aGVsbG8=",
"format": "png"
}
Capture a screenshot with options (format, quality, region)
Screenshot as base64-encoded image
POST
/
api
/
v1
/
sandbox
/
{id}
/
screenshot
curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/screenshot' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"format": "png",
"quality": 85,
"region": {
"x": 1,
"y": 1,
"width": 1,
"height": 1
}
}'
{
"image": "aGVsbG8=",
"format": "png"
}
Path parameters
string (uuid)
required
Sandbox identifier
Request body
ScreenshotRequest
string
required
integer
object
Response
object
string (byte)
required
Base64-encoded image data
string
required
Status codes
| Code | Meaning |
|---|---|
200 | Screenshot as base64-encoded image |
400 | Invalid request |
404 | Sandbox not found |
500 | Screenshot capture failed |
curl --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/screenshot' \
--header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"format": "png",
"quality": 85,
"region": {
"x": 1,
"y": 1,
"width": 1,
"height": 1
}
}'
{
"image": "aGVsbG8=",
"format": "png"
}
Last modified on August 31, 2026