---
updatedAt: 2026-09-04T01:56:54.000Z
agentTools:
  projectIndex: https://developer.tiliter.com/llms.txt
---

# Run Inference (v2 - Latest)

Compare an image against a reference image and identify differences Submit an image to analyze using the Reference Image Check (Pass/Fail) agent.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Vision Agent Platform API",
    "description": "Backend API for Vision Agent Platform with multi-provider LLM integration",
    "version": "1.0.0"
  },
  "paths": {
    "/api/v2/agents/reference-image-comparison/v2/inference": {
      "post": {
        "tags": [
          "Reference Image Check (Pass/Fail)"
        ],
        "summary": "Run Inference (v2 - Latest)",
        "operationId": "inner_api_v2_agents_reference_image_comparison_v2_inference_post",
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "X-API-Key",
              "description": "Your API key for authentication"
            },
            "description": "Your API key for authentication"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceRequestModel_reference-image-comparison-v2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse_ReferenceImageComparisonV2OutputSchema_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Compare an image against a reference image and identify differences Submit an image to analyze using the Reference Image Check (Pass/Fail) agent."
      }
    }
  },
  "components": {
    "schemas": {
      "MetaData": {
        "properties": {
          "agent_id": {
            "type": "string",
            "title": "Agent Id",
            "description": "Id of the agent that produced this response."
          },
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "Unique per-request id for tracing/logging."
          },
          "reference_files_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Files Count",
            "description": "Number of reference files supplied (if any)"
          }
        },
        "type": "object",
        "required": [
          "agent_id",
          "request_id"
        ],
        "title": "MetaData"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "InspectionStatus": {
        "type": "string",
        "enum": [
          "pass",
          "fail"
        ],
        "title": "InspectionStatus",
        "description": "Simple pass/fail status for general-purpose inspection agents."
      },
      "DifferenceSeverity": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ],
        "title": "DifferenceSeverity",
        "description": "Severity levels for differences found during image comparison."
      },
      "NormalizedBoundingBox": {
        "properties": {
          "x_min": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "X Min",
            "description": "Left edge coordinate (0.0 to 1.0)"
          },
          "x_max": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "X Max",
            "description": "Right edge coordinate (0.0 to 1.0)"
          },
          "y_min": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Y Min",
            "description": "Top edge coordinate (0.0 to 1.0)"
          },
          "y_max": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Y Max",
            "description": "Bottom edge coordinate (0.0 to 1.0)"
          }
        },
        "type": "object",
        "required": [
          "x_min",
          "x_max",
          "y_min",
          "y_max"
        ],
        "title": "NormalizedBoundingBox",
        "description": "Bounding box with coordinates normalized to the 0.0-1.0 range."
      },
      "InferenceRequestModel_reference-image-comparison-v2": {
        "properties": {
          "input_file_b64": {
            "type": "string",
            "maxLength": 1468006,
            "format": "base64",
            "contentMediaType": "application/octet-stream",
            "title": "Input File B64",
            "description": "Base 64 encoded input file data. Must be one of the following types: ['Image']."
          },
          "reference_files": {
            "items": {
              "type": "string",
              "maxLength": 1468006,
              "format": "base64",
              "contentMediaType": "application/octet-stream",
              "description": "Single reference file (decoded bytes)"
            },
            "type": "array",
            "maxItems": 5,
            "minItems": 1,
            "title": "Reference Files",
            "description": "Required list (1 to 5) of reference files provided as base64 strings / Base64Bytes. This agent cannot run without the required reference images. Each file must be <= 1.4MB decoded."
          },
          "criteria": {
            "type": "string",
            "title": "Criteria",
            "description": "What to look for when comparing the images",
            "examples": [
              "Shelf layout matches the reference planogram"
            ]
          }
        },
        "type": "object",
        "required": [
          "input_file_b64",
          "reference_files",
          "criteria"
        ],
        "title": "InferenceRequestModel_reference-image-comparison-v2"
      },
      "InferenceResponse_ReferenceImageComparisonV2OutputSchema_": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success",
            "description": "True when the agent completed successfully, false otherwise."
          },
          "metadata": {
            "$ref": "#/components/schemas/MetaData",
            "description": "Tracing metadata about the request."
          },
          "result": {
            "$ref": "#/components/schemas/ReferenceImageComparisonV2OutputSchema",
            "description": "Agent-specific structured output. Always present on success; failures raise HTTPException rather than returning success=false."
          },
          "processed_image_b64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processed Image B64",
            "description": "Base64-encoded processed image (e.g., with faces blurred) when privacy features are enabled"
          }
        },
        "type": "object",
        "required": [
          "success",
          "metadata",
          "result"
        ],
        "title": "InferenceResponse[ReferenceImageComparisonV2OutputSchema]"
      },
      "ReferenceImageComparisonV2OutputSchema": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/InspectionStatus",
            "description": "Result of the comparison: pass or fail"
          },
          "differences": {
            "items": {
              "$ref": "#/components/schemas/DifferenceV2Schema"
            },
            "type": "array",
            "title": "Differences",
            "description": "List of differences found between the images"
          },
          "explanation": {
            "type": "string",
            "title": "Explanation",
            "description": "Detailed explanation of the comparison result"
          },
          "confidence": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Confidence",
            "description": "Confidence score between 0.0 and 1.0"
          },
          "summary": {
            "type": "string",
            "title": "Summary",
            "description": "Short summary of the comparison result"
          }
        },
        "type": "object",
        "required": [
          "status",
          "differences",
          "explanation",
          "confidence",
          "summary"
        ],
        "title": "ReferenceImageComparisonV2OutputSchema"
      },
      "DifferenceV2Schema": {
        "properties": {
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Description of the difference found"
          },
          "severity": {
            "$ref": "#/components/schemas/DifferenceSeverity",
            "description": "Severity level: low, medium, or high"
          },
          "bounding_box": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NormalizedBoundingBox"
              },
              {
                "type": "null"
              }
            ],
            "description": "Approximate location of the difference, if determinable"
          }
        },
        "type": "object",
        "required": [
          "description",
          "severity"
        ],
        "title": "DifferenceV2Schema"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.ai.vision.tiliter.com",
      "description": "Production API"
    }
  ],
  "tags": [
    {
      "name": "Reference Image Check (Pass/Fail)",
      "description": "Compare an image against a reference image and identify differences Available versions: v2, v1 (latest: v2)."
    }
  ]
}
```