> ## Documentation Index
> Fetch the complete documentation index at: https://developer.valuechecker.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Forensics

export const EndpointButton = ({title, href}) => <div className="button-container">
    <a className="button" href={href}>
      {title}
      <span className="arrow">➜</span>
    </a>
  </div>;

Image Forensics analyzes claim images for signs of **AI generation** and
**digital manipulation** so that suspicious attachments can be surfaced to a
claim handler.

<Note>
  Image Forensics is an optional feature gated on the **Fraud Detection** client
  feature. It is enabled per client by ValueChecker. Endpoints on this page
  return a **Status 403** when the feature is not enabled for your client.
</Note>

## How it works

Forensics runs automatically on the images attached to the appraisals of a cart
(`client_reference`) as part of creating the claim. Each analyzed image receives
two independent verdicts, each with its own confidence score (`0`–`1`):

* **AI generated** — whether the image appears to be synthetically generated.
* **Digitally manipulated** — whether the image appears to have been edited.
  When the manipulation is localized, the result also carries the bounding
  boxes (**regions**) of the detected edits, normalized to the `[0, 1]` range.

When a verdict is confident enough, the image is marked as **flagged** and
surfaced through the endpoints below. The mark is removed automatically when a
later analysis comes back clean, so it never outlives the evidence for it.

## Analyze a single image

Statelessly analyze one image and get the verdicts back directly. This does not
require a cart or an appraisal — pass the image as a publicly reachable URL or
a base64-encoded string, and the response returns both verdicts, their
confidences, and (when manipulated) the detected edit regions.

<EndpointButton title="Analyze Image Endpoint" href="/api-reference/default/forensics-analyze" />

## Cart progress

Poll the aggregate forensics state of a whole cart. This is the **progress
indicator** only — it reports whether analysis is still running, has finished
with flagged images, or is clear. The verdicts themselves are returned by the
per-image results endpoints, not here.

<Info>
  The cart stays `in_progress` while its images are still being processed and
  only settles once every image has been analyzed — so a transition away from
  `in_progress` is the reliable "forensics done" signal. `in_progress` takes
  precedence over `has_flagged_images`.
</Info>

<EndpointButton title="Forensics Cart Progress Endpoint" href="/api-reference/default/forensics-progress" />

## Per-image results

Fetch the per-attachment status and verdict so you can show the outcome for
each image. Request the results for a single appraisal (scoped via the
`appraisal_id` query parameter), or fetch the whole cart at once keyed by
`appraisal_id`.

Each attachment entry carries its processing `status`, the two verdicts with
their confidences, the detected `regions` (when manipulated), and a `flagged`
value telling you whether the verdict was confident enough to mark the image.
The `file_name` matches the one in the appraisal's
[`attachments` array](/api-reference/appraisals#access-uploaded-file-urls), so
you can pair a verdict with the image it belongs to.

<Note>
  Results are stored per claimed item rather than per appraisal, so appraisals
  created from the same claimed item share the same attachments and therefore
  the same verdicts. Appraisals with no analyzed attachments are omitted from
  the whole-cart response (an absent key means "no results", the same as an
  empty list from the per-appraisal endpoint).
</Note>

<EndpointButton title="Forensics Results (Appraisal) Endpoint" href="/api-reference/default/forensics-results" />

<EndpointButton title="Forensics Results (Whole Cart) Endpoint" href="/api-reference/default/forensics-results-all" />

## Clear a verdict

When a claim handler has reviewed a flagged image and accepted it as safe, you
can manually clear the verdict. This marks the attachment clean and drops its
flagged state the same way a clean re-analysis would.

<Warning>
  Because verdicts are stored per claimed item, clearing an attachment clears it
  for every appraisal created from that item.
</Warning>

<EndpointButton title="Clear Forensics Verdict Endpoint" href="/api-reference/default/forensics-clear" />
