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

NameTypeDescription
Image URLsListURLs of the customer-submitted images to analyse (product, defect, label, receipt, etc).
Possible DefectsObjectDict 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 DescriptionStringDescription 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 NameStringName of the company/brand, included in the defect-detection prompt.
AI Generation DetectionBooleanWhether to check if any of the images are AI-generated by searching for suspicious metadata. Defaults to false.
Label DetectionBooleanWhether to detect which image (if any) shows a product label/tag. Defaults to false.
Zoom Out DetectionBooleanWhether to detect which image (if any) is a zoomed-out photo of the whole product. Defaults to false.
Receipt DetectionBooleanWhether 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

NameTypeDescription
ExplanationStringReasoning behind the detected defects (or lack thereof), one note per analysed image.
Defect DetectedBooleanWhether a defect was detected on any image.
Defect URLsListWhich of the inputted image URLs show a detected defect.
Detected DefectsListThe distinct defect type keys (from Possible Defects) detected across all images.
AI Generated DetectedBooleanWhether any of the images were detected as AI-generated by searching for suspicious metadata.
AI Generated URLsListWhich of the inputted image URLs are AI-generated.
Label DetectedBooleanWhether a product label/tag image was detected.
Label URLsListWhich of the inputted image URLs show the product label/tag.
Receipt DetectedBooleanWhether a receipt image was detected.
Receipt URLsListWhich of the inputted image URLs show a receipt.
Zoom Out DetectedBooleanWhether a zoomed-out product image was detected.
Zoom Out URLsListWhich of the inputted image URLs are the zoomed-out product shot.
Full OutputObjectNested breakdown of all detection results — see example below.
SuccessBooleanTrue 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 to false for 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_defect sentinel 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_id for that invocation.


Did this page help you?