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

# Run Inference (v1 - Latest)

Confirm shelf layout matches a planogram Submit an image to analyze using the Shelf Layout Validator 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/shelf-layout-validator/v1/inference": {
      "post": {
        "tags": [
          "Shelf Layout Validator"
        ],
        "summary": "Run Inference (v1 - Latest)",
        "operationId": "inner_api_v2_agents_shelf_layout_validator_v1_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_shelf-layout-validator-v1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse_ShelfLayoutValidatorOutputSchema_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Confirm shelf layout matches a planogram Submit an image to analyze using the Shelf Layout Validator 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"
      },
      "InferenceRequestModel_shelf-layout-validator-v1": {
        "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']."
          },
          "expected_layout": {
            "type": "string",
            "title": "Expected Layout",
            "description": "JSON string containing the expected shelf layout structure with rows, columns, and position details",
            "examples": [
              "Top shelf: cereals, Middle: canned goods, Bottom: drinks"
            ]
          }
        },
        "type": "object",
        "required": [
          "input_file_b64",
          "expected_layout"
        ],
        "title": "InferenceRequestModel_shelf-layout-validator-v1"
      },
      "InferenceResponse_ShelfLayoutValidatorOutputSchema_": {
        "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/ShelfLayoutValidatorOutputSchema",
            "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[ShelfLayoutValidatorOutputSchema]"
      },
      "ShelfLayoutValidatorOutputSchema": {
        "properties": {
          "positions": {
            "items": {
              "$ref": "#/components/schemas/ShelfPositionResult"
            },
            "type": "array",
            "title": "Positions",
            "description": "List of validation results for each expected position"
          },
          "total_positions": {
            "type": "integer",
            "minimum": 0,
            "title": "Total Positions",
            "description": "Total number of positions in the expected layout"
          },
          "matched": {
            "type": "integer",
            "minimum": 0,
            "title": "Matched",
            "description": "Number of positions where observed matches expected"
          },
          "mismatched": {
            "type": "integer",
            "minimum": 0,
            "title": "Mismatched",
            "description": "Number of positions with wrong product (not empty)"
          },
          "missing": {
            "type": "integer",
            "minimum": 0,
            "title": "Missing",
            "description": "Number of positions that are empty but should have product"
          },
          "overall_pass": {
            "type": "boolean",
            "title": "Overall Pass",
            "description": "True if all positions match, false otherwise"
          },
          "summary": {
            "type": "string",
            "title": "Summary",
            "description": "Brief summary of the shelf validation results"
          }
        },
        "type": "object",
        "required": [
          "positions",
          "total_positions",
          "matched",
          "mismatched",
          "missing",
          "overall_pass",
          "summary"
        ],
        "title": "ShelfLayoutValidatorOutputSchema"
      },
      "ShelfPositionResult": {
        "properties": {
          "position_id": {
            "type": "string",
            "title": "Position Id",
            "description": "Position identifier in format r{row}c{col}"
          },
          "row": {
            "type": "integer",
            "minimum": 1,
            "title": "Row",
            "description": "Row number (1-based)"
          },
          "col": {
            "type": "integer",
            "minimum": 1,
            "title": "Col",
            "description": "Column number (1-based)"
          },
          "expected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected",
            "description": "Expected product name for this position"
          },
          "observed": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed",
            "description": "Observed product name, or null if position is empty"
          },
          "match": {
            "type": "boolean",
            "title": "Match",
            "description": "Whether the observed product matches the expected product"
          },
          "confidence": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Confidence",
            "description": "Confidence score for this position's validation (0.0 to 1.0)"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Explanation if match is false (null otherwise)"
          }
        },
        "type": "object",
        "required": [
          "position_id",
          "row",
          "col",
          "expected",
          "observed",
          "match",
          "confidence"
        ],
        "title": "ShelfPositionResult"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.ai.vision.tiliter.com",
      "description": "Production API"
    }
  ],
  "tags": [
    {
      "name": "Shelf Layout Validator",
      "description": "Confirm shelf layout matches a planogram"
    }
  ]
}
```