# AgentRXI Image Diff (Visual Regression)

> AgentRXI Image Diff (Visual Regression) is a paid API for AI agents from agentrxi.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-15).

Compares two images pixel by pixel, returning a count and percentage of differing pixels with configurable fuzz tolerance, plus a highlighted diff image showing changes in red.

## Facts

- Endpoint: GET https://agentrxi.com/v1/image/diff?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentrxi-image-diff-visual-regression-d57cf9c4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dYNftf2CN8ianvEF9poxB

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 agentrxi-image-diff-visual-regression-d57cf9c4
```

Example prompt: Compare these two screenshots pixel by pixel and tell me how many pixels changed and what percentage — use a fuzz tolerance of 5% and highlight the differences in red: https://example.com/before.png and https://example.com/after.png

## When to prefer this

Use this endpoint when you need pixel-level visual regression testing between two images — especially for UI screenshots, design mockups, or any scenario where you need an exact quantified diff (count + percentage) and a visual red-highlight overlay. Prefer it over generic image similarity APIs when you need both a numeric metric and a rendered diff image. Best suited for automated QA pipelines, before/after deployment checks, and design review workflows.

## Known failure modes

- Invalid or unreachable image URL — returns an error if url_a or url_b cannot be fetched
- Images with mismatched dimensions may produce unexpected results or an error
- Payload exceeds 3MB threshold without store flag — automatically falls back to shareable link
- Malformed base64 input causes decoding failure
- Unsupported image format returns a format error

## How this service works

Compare two images pixel by pixel (visual regression testing for screenshots): count and percent of differing pixels with a fuzz tolerance, plus a diff image with the changes highlighted in red. Also callable as GET with the same fields as query parameters.

## Output

Returns a JSON object containing the count of differing pixels, the percentage of the image that differs, and a base64-encoded diff image (or a 7-day shareable link if store=true or the payload exceeds 3MB) with changed regions highlighted in red. The fuzz tolerance applied is also reported.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "fuzz": {
       "type": "number",
       "description": "Colour tolerance percent, default 3"
      },
      "store": {
       "type": "boolean",
       "description": "Return 7-day share links instead of base64 (+$0.001); automatic above 3 MB"
      },
      "url_a": {
       "type": "string"
      },
      "url_b": {
       "type": "string"
      },
      "format": {
       "type": "string",
       "description": "binary = raw file bytes (single output)"
      },
      "a_base64": {
       "type": "string"
      },
      "b_base64": {
       "type": "string"
      },
      "no_image": {
       "type": "boolean"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentrxi-image-diff-visual-regression-d57cf9c4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentrxi.com](https://www.zero.xyz/host/agentrxi.com/llms.txt)
