Multimodal image inspection and visual triage API
Combine up to four images with structured order metadata in one decision call—detecting damaged returns, unreadable receipts, and policy violations with calibrated probabilities on Clef-Flash vision.
Return claim #RET-4402: Buyer uploaded 2 JPEG photos (attached via image_url on paid API keys) showing a diagonal hairline crack across the upper-left corner of the OLED panel.
curl --fail-with-body https://clef-flash.com/api/v1/decisions \
-H "authorization: Bearer $CLEF_API_KEY" \
-H "content-type: application/json" \
--data-binary @- <<'CLEF_DECISION'
{
"model": "cloudflare/clef-flash",
"threshold": 0.87,
"state": "Return claim #RET-4402: Buyer uploaded 2 JPEG photos (attached via image_url on paid API keys) showing a diagonal hairline crack across the upper-left corner of the OLED panel.",
"questions": {
"visual_verdict": {
"type": "choice",
"instructions": "Classify this image + metadata submission using Clef-Flash native vision.",
"criteria": {
"pass_qa": "clear image matching listing specs with no damage or policy issue",
"damaged_defect": "visible crack, scratch, water stain or missing component",
"unreadable_blur": "motion blur, cropped document edges or unreadable serial/receipt",
"policy_reject": "watermarked stock photo, prohibited item or NSFW content"
}
},
"escalate_inspector": {
"type": "noul",
"instructions": "Should this visual inspection escalate to a human QA reviewer?",
"criteria": {
"true": "visible defect, unreadable document, policy violation or low confidence",
"false": "crisp compliant image ready for automatic approval"
}
}
}
}
CLEF_DECISION
Ship this in production with a $19 Pro key
2,000 decisions/day, 8 concurrent requests in flight, text + JSON + image states, and an API key emailed in about a minute.
Native vision decisions without chaining OCR, captioners, and LLMs
Visual QA workflows—checking whether a return-claim photo actually shows a cracked screen, whether an expense receipt is too blurry to reimburse, or whether a marketplace listing violates watermark rules—traditionally required chaining an image captioner or VLM with a separate text classifier.
Both Clef-Flash (9B) and Clef (27B) ship with a native vision encoder baked into the decision weights. Send images alongside structured order JSON on /api/v1/decisions and receive exact typed choices and calibrated escalation probabilities in one pass.
- Paid API keys support up to 4 images per request (up to 4 MiB per image, 8 MiB total body).
- Evaluates image pixels and accompanying JSON metadata (SKU, return reason, policy rules) jointly.
- Routes borderline visual inspections cleanly to human QA via needsReview: true.
Visual triage endpoint boundaries and model options
Know the exact endpoint boundaries before integrating image uploads into your backend.
| Capability | Free /api/decide (Playground) | Paid /api/v1/decisions (API Key) |
|---|---|---|
| Image attachments | 0 images (text & JSON only) | Up to 4 images × 4 MiB each (8 MiB body) |
| Text + JSON ceiling | 8,000 characters | 200,000 chars body / 24,576 tokens on Flash |
| Fast visual triage model | cloudflare/clef-flash (9B) | cloudflare/clef-flash (9B) · $0.019/1M input |
| High-precision vision model | cloudflare/clef (27B) | cloudflare/clef (27B) for subtle defect QA |
Automating returns QA, receipt verification, and listing checks
High-volume e-commerce, expense management, and logistics apps can auto-approve crisp compliant photos and instant low-value damage claims while routing only ambiguous or high-dollar claims (where P(escalate_inspector) crosses threshold) to specialist human reviewers.
Configure your visual schema in the interactive studio above, inspect the calibrated request body, and unlock multimodal image endpoints immediately with a $19 Pro API key.
When to pick 9B Clef-Flash vs. 27B Clef for vision tasks
Clef-Flash (9B) handles clear visual categories—blur detection, receipt crop checks, obvious watermarks, and overt physical damage—at maximum speed. For fine hairline defects or dense small-print documents, switch model to cloudflare/clef (27B) on the exact same schema.
Frequently asked questions
How many images can I attach to one POST /api/v1/decisions request?
Paid API keys on /api/v1/decisions accept up to 4 images (up to 4 MiB each, 8 MiB total request body) alongside text and JSON context. The free anonymous playground supports text and JSON only.
Can I combine order metadata (SKU, item price, return reason) with the image?
Yes. Send multimodal content parts containing both the JSON/text metadata and the image URLs or data URIs in the same request so Clef-Flash evaluates them jointly.
What image formats work best for visual decision triage?
Standard JPEG, PNG, and WebP images sized cleanly for screen inspection (under 4 MiB per image) decode quickly without inflating request transfer time.
What is the cheapest plan that unlocks multimodal image decisions?
The $19 Pro API key (30 days, no auto-renewal) unlocks full /api/v1/decisions access including up to 4 images per call, 2,000 decisions/day, and 8 concurrent requests.
Keep reading
- Document classification API
- E-commerce review moderation API
- Clef vs Clef-Flash (27B vs 9B)
- Vision decisions guide
- Pricing & API keys
Model notes
One short email when a new decision model lands or a benchmark changes. No spam, unsubscribe in one click.