Leap0

Region screenshot

Capture a specific region of the screen.

POST/api/screenshot/region

Capture a specific region of the screen.

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

x*integer

Left edge of the capture region.

Range0 <= value
y*integer

Top edge of the capture region.

Range0 <= value
width*integer

Region width in pixels.

Range1 <= value
height*integer

Region height in pixels.

Range1 <= value
format?string

Image format.

Value in"png" | "jpg" | "jpeg"
quality?integer

JPEG quality.

Range1 <= value <= 100

Response Body

application/json

curl -X POST "https://<sandbox_id>.sandbox.leap0.dev/api/screenshot/region" \  -H "Content-Type: application/json" \  -d '{    "x": 0,    "y": 0,    "width": 1,    "height": 1  }'
"string"
{  "message": "Invalid request",  "errors": [    {      "field": "string",      "error": "string"    }  ]}