Snipaya
v1.2.2Annotate screenshots in the Snipaya macOS app: arrows, text, redaction, crop, export
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
snipaya_get_canvas Get canvas
Describe the open tabs and the active canvas: images (id, position, size, original pixel size), annotations (id, kind, geometry, style, text, anchors), selection and crop. Call this first.
| Parameter | Type | Description |
|---|---|---|
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_render Render canvas
Return a PNG of the canvas (or only the given element ids) so you can see what the user sees. Downscaled to maxSize on the longest side.
| Parameter | Type | Description |
|---|---|---|
beautify | Frame the image on a background. true uses the user’s beautify settings, an object overrides some of them, false turns it off. Omit to follow the user’s setting. | |
ids | array | |
maxSize | integer | |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_image Add image
Add a screenshot or image to the canvas from an absolute file path or a data URL. Related images (before and after, steps of a flow) go on one canvas with placement "add". Use "new-tab" only to start a new, unrelated image, never one tab per related image.
| Parameter | Type | Description |
|---|---|---|
dataUrl | string | |
path | string | Absolute path to an image file (max 25 MB). |
placement | string |
snipaya_add_arrow Add arrow or line
Draw a straight arrow (head at "to") or, with head false, a line. curved true draws a gentle curved arrow. Ends landing on an image are anchored to it.
| Parameter | Type | Description |
|---|---|---|
from * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
to * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
curved | boolean | |
head | boolean | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_shape Add shape
Add a rectangle frame, ellipse, highlighter box, blur (pixelate) or noise (opaque random colors from the area, the safest way to hide sensitive data) over a region. For blur and noise, pixelSize sets the block size; larger is coarser.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
rect * | object | A rectangle (top-left corner plus size). Canvas units, or image pixels with relativeTo. |
pixelSize | number | Blur or noise block size in the units of rect. Defaults to the user’s Blur or Noise tool size. |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_text Add text
Add a text label with its top-left corner at "at". Supports \n for new lines.
| Parameter | Type | Description |
|---|---|---|
at * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
text * | string | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_step Add step number
Add an auto-numbered step badge (1, 2, 3...) centered at "at", for step-by-step guides. size is the badge diameter; make it larger on big screenshots.
| Parameter | Type | Description |
|---|---|---|
at * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
size | number | |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_emoji Add emoji
Place an emoji sticker centered at "at".
| Parameter | Type | Description |
|---|---|---|
at * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
emoji * | string | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
size | number | |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_freehand Add freehand stroke
Draw a freehand pen line, highlighter stroke or curved arrow through the given points. The path is smoothed like a hand-drawn stroke.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
points * | array | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_magnifier Add magnifier
Add a round magnifying lens at "lens" that shows a zoomed view of the area around "source". radius defaults to about 8% of the short side of the image under the source.
| Parameter | Type | Description |
|---|---|---|
lens * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
source * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
radius | number | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
zoom |
snipaya_add_callout Add callout
Add a speech-bubble callout with text in "rect" and a tail pointing at "tail" (defaults to below the box). The box grows to fit the text.
| Parameter | Type | Description |
|---|---|---|
rect * | object | A rectangle (top-left corner plus size). Canvas units, or image pixels with relativeTo. |
text * | string | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
tail | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
snipaya_add_spotlight Add spotlight
Dim everything except "rect" (form rect or ellipse) to draw attention to it. dim (0 to 1) changes the user’s spotlight darkness setting for all spotlights.
| Parameter | Type | Description |
|---|---|---|
rect * | object | A rectangle (top-left corner plus size). Canvas units, or image pixels with relativeTo. |
dim | number | |
form | string | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_add_measure Add measurement
Draw a measuring line from "from" to "to" labeled with its length in image pixels. Returns the label.
| Parameter | Type | Description |
|---|---|---|
from * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
to * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
style | object | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_pick_color Pick color
Read the color of the image pixel at "at" and return it as a #rrggbb hex. Changes nothing.
| Parameter | Type | Description |
|---|---|---|
at * | object | A point. Canvas coordinates, or image pixels when relativeTo is set. |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_read_text Read text
Recognize text (on-device OCR) in the images and return the lines in reading order with their rects. Limit it with rect and/or imageId. Rects use the relativeTo space when set.
| Parameter | Type | Description |
|---|---|---|
imageId | string | Only read this image. |
rect | object | A rectangle (top-left corner plus size). Canvas units, or image pixels with relativeTo. |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_redact Redact sensitive data
Find emails, phone numbers, IBANs, card numbers, tokens, IP addresses, passwords and faces (on-device) and cover them in one undo step, in the user’s Redaction style (noise by default). style overrides it: noise fills the area with opaque random colors from it, blur pixelates with blocks sized to the text, solid covers it with a plain box. pixelSize sets the noise block size or a coarser minimum for blur. Defaults to every image and category. Returns the ids and counts.
| Parameter | Type | Description |
|---|---|---|
categories | array | |
imageIds | array | |
pixelSize | number | Noise block size, or minimum blur block size, in canvas units. |
style | string | noise, blur or solid. Defaults to the user’s Redaction setting. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_update_items Update elements
Change existing elements by id: move (x, y), resize (width, height), rotate (degrees), change text, or restyle. For steps, width or style.fontSize resizes the badge. All updates are one undo step.
| Parameter | Type | Description |
|---|---|---|
updates * | array | |
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_delete_items Delete elements
Delete elements (images or annotations) by id. One undo step.
| Parameter | Type | Description |
|---|---|---|
ids * | array | |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_select Select elements
Select elements by id so the user sees which ones you mean. An empty list clears the selection.
| Parameter | Type | Description |
|---|---|---|
ids * | array | |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_arrange Arrange images
Lay out all images of the tab in a row, column or grid with an optional gap.
| Parameter | Type | Description |
|---|---|---|
layout * | string | |
gap | number | |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_set_crop Set crop
Crop exports to a rectangle, or pass null to remove the crop.
| Parameter | Type | Description |
|---|---|---|
rect * | ||
relativeTo | string | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_undo Undo
Undo the last change on the tab (yours or the user’s).
| Parameter | Type | Description |
|---|---|---|
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_redo Redo
Redo the last undone change on the tab.
| Parameter | Type | Description |
|---|---|---|
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_tabs Manage tabs
Open a new empty tab, switch to a tab, or close a tab (closing never discards unsaved work without asking the user).
| Parameter | Type | Description |
|---|---|---|
action * | string | |
tabId | string |
snipaya_export Export image
Export the canvas (or given ids) as PNG or JPG. With path, writes the file (absolute path, matching extension, refuses to overwrite unless overwrite is true); without path, returns the image.
| Parameter | Type | Description |
|---|---|---|
format * | string | |
beautify | Frame the image on a background. true uses the user’s beautify settings, an object overrides some of them, false turns it off. Omit to follow the user’s setting. | |
ids | array | Export only these elements. Defaults to the whole canvas (or crop). |
overwrite | boolean | |
path | string | Absolute file path to write. Omit to receive the image in the response. |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_list_destinations List export destinations
List the export destinations the user set up (share menu, open with an app, quick save folder, uploaders, Jira, Confluence) with their ids for snipaya_export_to.
snipaya_export_to Export to destination
Render the canvas (or given ids) as PNG and send it to a destination from snipaya_list_destinations. Uploads to network destinations always ask the user to confirm first. Returns the link or file path.
| Parameter | Type | Description |
|---|---|---|
destination * | string | |
beautify | Frame the image on a background. true uses the user’s beautify settings, an object overrides some of them, false turns it off. Omit to follow the user’s setting. | |
ids | array | |
tabId | string | Target tab id. Defaults to the active tab. |
snipaya_save_project Save project
Save the tab as a .snipaya project. Without path, saves to the tab’s existing file; a tab that was never saved needs an absolute path.
| Parameter | Type | Description |
|---|---|---|
overwrite | boolean | |
path | string | |
tabId | string | Target tab id. Defaults to the active tab. |