Jev: Locate in image
Description
Section titled “Description”Experimental. TypeSafe’s images and
boxquestions sit behind a “Danger-Zone” header (TypeSafe-Danger-Zone-Images): they may change without notice. The node sends that header for you.
Locates something in an image (for example “the invoice total” or “the logo”) and returns its box: coordinates from 0 to 1 relative to the image’s height and width, and also in pixels (the node reads the size from the PNG or JPEG header). With that you can crop the area, check that it exists or hand it to another node.
The image is sent to TypeSafe as an asset and the node references it with a placeholder, as TypeSafe documents. Only PNG and JPEG are supported; the format is deduced from the bytes, not the extension.
Configuration
Section titled “Configuration”Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | TypeSafe credential (API key). |
| model | select | Yes | Jev model. Images work best with jev-preview (the one TypeSafe’s documentation uses in its examples). |
| image | textarea | Yes | Image as base64 (the data:image/png;base64, prefix is accepted) or a variable, e.g. \{\{image\}\}. Up to 20 MB. |
| target | textarea | Yes | What to locate, e.g. “Locate the invoice total”. Describe it precisely; English works better. |
| output_key | text | No | Key in the data where the result is stored. Default jev. |
Credentials
Section titled “Credentials”Requires a TypeSafe credential (credentials_id) holding the api_key from the TypeSafe console (TYPESAFE_API_KEY). The key is yours: TypeSafe bills the usage, not Floogos.
Output
Section titled “Output”The result is added to the input data. Read it as \{\{jev.box\}\}, \{\{jev.pixels\}\}…
{ "nextModule": "next-node", "data": { "...": "input data, untouched", "jev": { "box": { "top": 0.1, "bottom": 0.5, "left": 0.2, "right": 0.6 }, "confidence": 0.9, "pixels": { "x": 200, "y": 50, "width": 400, "height": 200 }, "image": { "format": "png", "width": 1000, "height": 500, "bytes": 48213 }, "model": "jev-preview", "usage": { "input_tokens": 900, "output_tokens": 8 }, "cost_usd": 0.000038 } }}A single output (nextModule).
Example
Section titled “Example”Check that a scanned invoice has a total
Section titled “Check that a scanned invoice has a total”Download the image with an HTTP node, convert it to base64 and pass it in image. With target = Locate the invoice total, an If node on \{\{jev.confidence\}\} decides whether a total can be located (for example confidence above 0.7) or the invoice needs manual review.
- Experimental: it depends on a TypeSafe “Danger-Zone” header. Do not use it in critical processes without a human-review path.
- Privacy: the image leaves Floogos for TypeSafe, a third party. Do not send documents you cannot share (IDs, invoices with personal data…) without checking their terms.
- Limits: PNG or JPEG, up to 20 MB (the API accepts a 32 MiB body and base64 weighs a third more). Coordinates are relative:
topandbottomto the height,leftandrightto the width. - Variables: the engine substitutes
\{\{image\}\}before running the node; the node does not substitute again. - Errors:
missing_credentials,validation(invalid image or format, missingtarget),auth_error,rate_limited,overloaded,state_too_large(image too large),jev_errorandconnection_error. 429, 529, 5xx and network drops retry automatically. - Language: Jev performs best in English; other languages have lower accuracy.