feat(api): support asImage=true on screen and zoom
All checks were successful
python-syntax / syntax-check (push) Successful in 4s

This commit is contained in:
2026-04-05 20:03:32 +02:00
parent 4aa51e2d69
commit 683f2d5961
3 changed files with 28 additions and 8 deletions

View File

@@ -22,8 +22,9 @@ Query params:
- `include_labels` (bool, default `true`)
- `image_format` (`png`|`jpeg`, default `png`)
- `jpeg_quality` (1-100, default `85`)
- `asImage` (bool, default `false`) — if `true`, return raw image bytes only (`image/png` or `image/jpeg`)
Response includes base64 image and metadata (`meta.region`, optional `meta.grid`).
Default response includes base64 image and metadata (`meta.region`, optional `meta.grid`).
## `POST /zoom`
@@ -44,7 +45,11 @@ Body:
}
```
Returns cropped image + region metadata in global pixel coordinates.
Query params:
- `asImage` (bool, default `false`) — if `true`, return raw image bytes only (`image/png` or `image/jpeg`)
Default response returns cropped image + region metadata in global pixel coordinates.
## `POST /action`