Piglet Reference
Routes
HTTP API routes exposed by the Piglet process
Piglet exposes a RESTful API that can be accessed directly or through the Python SDK.
Display API
-
GET /computer/display/screenshot
- Returns body: image/png bytes
-
GET /computer/display/dimensions
- Returns json body:
{ width: number, height: number }
- Returns json body:
Keyboard API
-
POST /computer/input/keyboard/type
- Requires json body:
{ text: string }
- Requires json body:
-
POST /computer/input/keyboard/key
- Requires json body:
{ text: string }
- Requires json body:
Mouse API
-
GET /computer/input/mouse/position
- Returns json body:
{ x: number, y: number }
- Returns json body:
-
POST /computer/input/mouse/move
- Requires json body:
{ x: number, y: number }
- Requires json body:
-
POST /computer/input/mouse/click
- Requires json body:
{ x: number, y: number, button: "left"|"right", down: boolean }
- Requires json body: