# VisionFlow Match – Template Matching

> VisionFlow Match – Template Matching is a paid API for AI agents from visionflow-match.saastemly.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-22).

Locates where a small pattern image appears inside a larger image using OpenCV cv2.matchTemplate, returning pixel bounding boxes and scores for the best and all non-overlapping matches above a threshold.

## Facts

- Endpoint: POST https://visionflow-match.saastemly.com/v1/template-match?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/visionflow-match-template-matching-51d486c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uxW5_29k7q3_si7VHdvsk

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability visionflow-match-template-matching-51d486c3 -d '<json body>'
```

Example prompt: I have a screenshot of a web page and a small cropped image of the 'Submit' button — can you find where that button appears in the screenshot, returning its pixel coordinates, using TM_CCOEFF_NORMED with a threshold of 0.85 and up to 3 matches?

## When to prefer this

Use this endpoint when your pattern and the target image are at the same scale and orientation (no rotation, scaling, or perspective distortion) and you need fast, exact pixel-level template matching. Prefer it over the homography or feature-match siblings when dealing with crisp pixel-identical crops like UI elements, icons, or logos captured at the same resolution. If the pattern might appear at a different scale or angle, use the homography or feature-matching endpoints instead.

## Known failure modes

- No match found above threshold — returns empty match list; lower the threshold or verify the template is from the same scale/perspective as the image
- Template larger than image — returns error
- Image or template exceeds size limits (4MP/2MB for image, 1MP/1MB for template) — returns error
- Unsupported image format — returns error
- Template and image scale/rotation differ — results unreliable; use /v1/homography instead
- Base64 decoding failure if data URI is malformed

## How this service works

Find where a small pattern image (a button, icon, logo or crop) appears inside a larger screenshot or picture, using OpenCV cv2.matchTemplate. Returns the best position, plus every non-overlapping position scoring above the threshold, as pixel boxes with scores. Use it for exact-looking pixel patterns at the same scale; for different scale, rotation or perspective use /v1/homography.

## Output

Returns the best match position (bounding box with x, y, width, height and score) plus a list of all non-overlapping positions scoring above the threshold, each as a pixel bounding box with its match score. Scores range from 0 to 1 (higher is better, except TM_SQDIFF_NORMED which is 1 minus the squared-difference value).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image": {
   "type": "string",
   "description": "Base64 of a PNG, JPEG, BMP or WebP file (a data: URI also works). At most 4 million pixels and about 2 MB. Alpha is dropped."
  },
  "method": {
   "enum": [
    "TM_CCOEFF_NORMED",
    "TM_CCORR_NORMED",
    "TM_SQDIFF_NORMED"
   ],
   "type": "string",
   "description": "OpenCV matching method (default TM_CCOEFF_NORMED, robust to brightness change). Scores are 0-1, higher is better; for TM_SQDIFF_NORMED the score is 1 minus the squared-difference value"
  },
  "template": {
   "type": "string",
   "description": "Base64 of the pattern to find, same formats. At most 1 million pixels and about 1 MB. Must fit inside the image."
  },
  "grayscale": {
   "type": "boolean",
   "description": "Match on grayscale versions of both images (default false: match all three colour channels)"
  },
  "threshold": {
   "type": "number",
   "description": "Minimum score for a match, 0-1 (default 0.8)"
  },
  "max_matches": {
   "type": "integer",
   "description": "Most matches returned, 1-50 (default 5); overlapping positions are suppressed"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/visionflow-match-template-matching-51d486c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from visionflow-match.saastemly.com](https://www.zero.xyz/host/visionflow-match.saastemly.com/llms.txt)
