Warranty Master
Runs AI-generated / label / receipt / zoom-out image detection (each independent and best-effort) on a set of images, then runs defect detection — against a supplied list of possible defects — on whichever images remain (i.e. not AI-generated, not a label, not a receipt). Also posts best-effort per-image warranty analytics to the flow-server.
Inputs
| Name | Type | Description |
|---|---|---|
| Image URLs | List | URLs of the customer-submitted images to analyse (product, defect, label, receipt, etc). |
| Possible Defects | Object | Dict mapping defect type key to a description, e.g. {"sole_delamination": "The sole of the shoe is coming off"}. Used to constrain defect detection. |
| Product Description | String | Description of the product being claimed against, e.g. from the OMS line item (e.g. "Pair of jeans with BlackOut written down the side"). |
| Company Name | String | Name of the company/brand, included in the defect-detection prompt. |
| AI Generation Detection | Boolean | Whether to check if any of the images are AI-generated by searching for suspicious metadata. Defaults to false. |
| Label Detection | Boolean | Whether to detect which image (if any) shows a product label/tag. Defaults to false. |
| Zoom Out Detection | Boolean | Whether to detect which image (if any) is a zoomed-out photo of the whole product. Defaults to false. |
| Receipt Detection | Boolean | Whether to detect which image (if any) shows a receipt. Defaults to false. |
Models are fixed internally (not exposed as inputs): label/receipt/zoom-out classification uses the small model tier; defect detection uses the big model tier. Since these tier aliases are resolved to concrete models server-side, they improve over time without this action needing a model-selection input.
Outputs
| Name | Type | Description |
|---|---|---|
| Explanation | String | Reasoning behind the detected defects (or lack thereof), one note per analysed image. |
| Defect Detected | Boolean | Whether a defect was detected on any image. |
| Defect URLs | List | Which of the inputted image URLs show a detected defect. |
| Detected Defects | List | The distinct defect type keys (from Possible Defects) detected across all images. |
| AI Generated Detected | Boolean | Whether any of the images were detected as AI-generated by searching for suspicious metadata. |
| AI Generated URLs | List | Which of the inputted image URLs are AI-generated. |
| Label Detected | Boolean | Whether a product label/tag image was detected. |
| Label URLs | List | Which of the inputted image URLs show the product label/tag. |
| Receipt Detected | Boolean | Whether a receipt image was detected. |
| Receipt URLs | List | Which of the inputted image URLs show a receipt. |
| Zoom Out Detected | Boolean | Whether a zoomed-out product image was detected. |
| Zoom Out URLs | List | Which of the inputted image URLs are the zoomed-out product shot. |
| Full Output | Object | Nested breakdown of all detection results — see example below. |
| Success | Boolean | True only if none of the requested detection steps failed. AI-generation, label, receipt and zoom-out detection run independently, so one failing does not fail the others. |
Possible Defects example
Possible Defects is a flat object mapping a defect type key to a natural-language description. The description is what actually goes into the defect-detection prompt, so make it specific enough to distinguish between similar defect types.
```json {"sole_delamination": "The sole of the shoe is coming away from the upper",
"torn_upper": "The upper material of the shoe is torn or ripped",
"broken_lace_eyelet": "A lace eyelet or hook is broken or missing"}
```
Full Output example
Full Output mirrors the flat outputs above but grouped by detection category, each with a detected boolean and the matching url list.
```json {"defect_images": {
"detected": true,
"url": ["https://.../defect1.jpg"]
},
"ai_generated_images": {
"detected": false,
"url": []
},
"label_images": {
"detected": true,
"url": ["https://.../label.jpg"]
},
"receipt_images": {
"detected": true,
"url": ["https://.../receipt.jpg"]
},
"zoom_out_images": {
"detected": true,
"url": ["https://.../defect1.jpg"]
}}
```
Notes
- AI-generation, label, receipt and zoom-out detection each run as independent, best-effort steps. A failure in one (e.g. an upstream service error) does not block or fail the others — it's simply reported as
false/empty for that category, and only flips Success tofalsefor the step(s) that actually failed. - Images matched as AI-generated, a label, or a receipt are excluded from defect detection. Zoom Out is deliberately not excluded — it only describes photo framing, so a full product shot that also shows a visible defect can correctly appear in both Zoom Out URLs and Defect URLs.
- If Possible Defects is empty (or Image URLs is empty), defect detection is skipped entirely — no defect-detection calls are made.
- The defect-detection model is instructed to only ever return a defect type from Possible Defects, or a
no_defectsentinel when no defect is visible or the image can't be reliably assessed (blurry, wrong product, etc.) — it's told never to guess. - Explanation only includes a note for images where a defect was found or analysis failed; images with no issue and a successful analysis don't add a note.
- This action also posts per-image warranty analytics to the flow-server: one record per input image, all sharing a single
group_idfor that invocation.
Updated about 13 hours ago