---
updatedAt: 2026-07-30T06:30:58.000Z
agentTools:
  projectIndex: https://developer.tiliter.com/llms.txt
---

# Run Inference (v2 - Latest)

Count objects and compare against an expected quantity Submit an image to analyze using the Count Check 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/count-check/v2/inference": {
      "post": {
        "tags": [
          "Count Check"
        ],
        "summary": "Run Inference (v2 - Latest)",
        "operationId": "inner_api_v2_agents_count_check_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_count-check-v2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceResponse_CountCheckV2OutputSchema_"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "description": "Count objects and compare against an expected quantity Submit an image to analyze using the Count Check 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"
      },
      "PassFailStatus": {
        "type": "string",
        "enum": [
          "pass",
          "fail"
        ],
        "title": "PassFailStatus",
        "description": "Binary pass/fail status for count and numeric range checks."
      },
      "InferenceRequestModel_count-check-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']."
          },
          "object_type": {
            "type": "string",
            "title": "Object Type",
            "description": "Type of object to count",
            "examples": [
              "pallets"
            ]
          },
          "expected_count": {
            "type": "integer",
            "minimum": 0,
            "title": "Expected Count",
            "description": "Expected number of objects",
            "examples": [
              5
            ]
          },
          "confidence": {
            "type": "number",
            "maximum": 1,
            "minimum": 0,
            "title": "Confidence",
            "description": "Minimum confidence threshold (0.0 to 1.0). If the model's confidence is below this value, the check will fail even if the count matches.",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "input_file_b64",
          "object_type",
          "expected_count"
        ],
        "title": "InferenceRequestModel_count-check-v2"
      },
      "InferenceResponse_CountCheckV2OutputSchema_": {
        "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/CountCheckV2OutputSchema",
            "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[CountCheckV2OutputSchema]"
      },
      "CountCheckV2OutputSchema": {
        "properties": {
          "mask_overlay_png_b64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mask Overlay Png B64",
            "description": "Base64-encoded PNG overlay image for segmentation masks"
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "title": "Count",
            "description": "Number of objects counted in the image"
          },
          "status": {
            "$ref": "#/components/schemas/PassFailStatus",
            "description": "Whether the count matches the expected quantity: pass or fail"
          },
          "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 count check result"
          }
        },
        "type": "object",
        "required": [
          "count",
          "status",
          "confidence",
          "summary"
        ],
        "title": "CountCheckV2OutputSchema"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.ai.vision.tiliter.com",
      "description": "Production API"
    }
  ],
  "tags": [
    {
      "name": "Count Check",
      "description": "Count objects and compare against an expected quantity Available versions: v2, v1 (latest: v2)."
    }
  ]
}
```