sanus-ai-label
live label preview — the core decides, the browser only shows API base:
Upload an image and change an option; the page re-renders through
POST /label 400 ms later. Every number below comes from the core report.
options
no image yet
preview
nothing uploaded yet — the stamped result is the main view, the original is a small collapsible thumbnail
report
—
the report from POST /label appears here
API
Base URL of this instance, read from the browser location so it matches
whatever host and scheme served this page:
| Route | Meaning |
|---|---|
GET /health |
Tool and core versions. |
POST /label |
Multipart form: image plus options as a JSON object in
options, or as single fields such as verify=true.
Returns the report; with include_image=true also the stamped
image as base64. |
GET / |
This page. It is a presenter: it posts to the same origin, so no CORS is needed. |
curl examples against this host
options the core parses
| Field | Default | Core rule |
|---|---|---|
position | bottom-right | 9-point raster; the position you pick is always the position the label is drawn
on. A busy cell is reported as requested_position_occupied plus a
warning, and a label as wide as the image is reported as
position_collapsed. |
size_pct | 8 | Percent of image width, upper limit 13. Shorter icon edge never goes below 24 px when the lifted icon still fits inside the image. |
margin_pct | 3 | Percent of image width. |
opacity | 100 | 1–100, burn-in compositing. |
color | auto | auto reads the average brightness at the actual position: dark →
white icon, light → black icon. |
icon | generated | ai ·
generated · modified; also sets the default
source_type. |
source_type | auto | IPTC DigitalSourceType; the XMP packet is embedded as PNG tEXt,
JPEG APP1 or WebP RIFF XMP chunk, other containers are reported as
xmp_written: false. |
format | webp | Output container: original keeps the input container, otherwise
png, jpg, webp. The page only names the
container, the core encodes and embeds the packet into it. WebP here is lossless
and JPEG is not, so exact-pixel verification can fail on recompressed JPEG. |
verify | false | Runs the verifier on the encoded result. |
include_image | false | Base64 of the stamped image, byte for byte what the CLI writes. The API stays report-only unless a caller asks for it. |
AI instructions — full block for an agent client
The block is generated from this page's origin and the option values above, so it matches the instance you are looking at. It documents the core rules, it does not compute them.
Calling this API from an agent or AI client
A client posts the image and the option names above and reads the report —
nothing on the client side decides placement, size, color or metadata. The fields worth
reading are placement (what was drawn and why), metadata
(IPTC, XMP, C2PA), guardrails (which rule applied) and verify
(whether the stamped bytes carry the label back). If a warning is recorded, the label
stayed at the position you picked and the image was not changed beyond the documented
guardrails.
For an MCP client, sal-mcp exposes the same core over stdio:
stamp_image, classify, verify_label. The MCP tools
and this API map arguments to the same LabelOptions, so they behave
identically.
Using the icon is voluntary, and the transparency obligation itself is not discharged by stamping a picture. Provider and deployer duties stay with the person or organisation that publishes the content. Nothing here — not the code, not the report fields — is a legal opinion or proof of compliance.