API reference
16 endpoints grouped by tag. Click any to see schema, REST/MCP/SDK examples, and try it live.
audio
examples
generate-image
Generate an image from a text prompt. Returns a JobHandle; poll the get-job-status tool with the returned job_id (every 1-2s) until status is 'completed'. 3 credits per call.
summarize-url
Fetch a URL and return a title + preview snippet. 1 credit per call.
transcribe-audio
Transcribe an audio file via a webhook-capable provider (Pattern 4). Returns a JobHandle; poll the get-job-status tool with the returned job_id (every 1-2s) until status is 'completed'. 2 credits per call.
expiry
expiry-add-item
Save a confirmed scanned item (product, expiry date, quantity).
expiry-barcode-lookup
Look up a product name by barcode: our own cache first, then Open Food Facts. Returns found=false if neither has it — caller falls back to manual name entry. Public (no auth required), same as the future standalone 'BiH Barcode Lookup' MCP server (PLAN.md).
expiry-dashboard
Home-screen summary: active items split into red/yellow/green urgency bands (<=1 / 2-3 / 4-7+ days to expiry, DLCScan pattern from PLAN.md), plus totals.
expiry-edit-item
Correct a data-entry mistake on an already-saved item — product name, expiry date, quantity, received date, or batch number. Distinct from expiry-update-quantity (daily recount ritual): this is for fixing a typo at any time, not the routine 'what's left today' check. Only fields actually provided are changed; the rest are left untouched.
expiry-list-items
List the caller's scanned items grouped by expiry date, optionally filtered to a date range and/or status (active/handled/all).
expiry-mark-handled
Mark a scanned item as handled (sold/removed), or soft-delete it.
expiry-resolution-report
Otpisano/vraćeno report for a date range (filtered on when it was resolved, not its expiry date) — product, expiry date, reason, quantity per row, plus totals. Feeds the dashboard card + print/PDF export.
expiry-scan-label
Read the expiry date off a product-label photo via AI vision. Returns a suggestion for the caller to confirm/edit; does not save anything.
expiry-set-resolution-reason
Resolve an item as 'otpisano' (written off/discarded), 'vraceno' (returned to supplier), or 'prodano' (sold, no write-off/return) for a specific quantity — works on an ACTIVE item (resolves it on the spot) or on an already-handled one (just re-annotates why, correcting a mis-click). A partial write-off is normal: quantity here can be less than the item's current stock (e.g. 3 of 10 spoiled, the rest still sold normally).
expiry-update-quantity
Update how many units of a scanned item are left (daily recount by staff — there is no POS integration, so this is the only way the app learns a sale happened). Reaching 0 auto-marks the item handled.