Capture
Set the capture region
Steers VisionPiper's one stored capture region (vision_region_set). Supply exactly one of:
- a rect: all four of x, y, width, height, in space (display = points from the target display's top-left, the default; global = global points with the main display at the origin);
- a named target: window_title and/or bundle_id (a window), selector (an accessibility element, optionally scoped by bundle_id) or description (something to find on screen);
- pick: true, which opens VisionPiper's drag-to-select overlay and waits for the user.
An explicit rect outranks a named target and the overlay. VisionPiper stays the region's owner: it trims an overhang, and the applied rect it reports is what the response carries. Every refusal rides the precondition_failed envelope with a typed reason: visionpiper_unavailable, screen_recording_denied, invalid_region, unknown_display, selection_cancelled, selection_timed_out, or a named-target resolver reason such as window_not_found. Tolerate unknown reasons.
post/v1/vision/region
Request
- Base URL: http://localhost:9998
- URL: http://localhost:9998/v1/vision/region
- Auth: HTTP bearer
Request body
Response
Region applied (status is region_set)
Changes
No recorded changes to this operation across all 1 revision of this API.