---
title: "Run Inference"
method: POST
path: "/api/v1/vision/detect"
tags: ["Vision"]
---

# Run Inference

`POST /api/v1/vision/detect`

## Request body

- InferenceRequest
  - `confidence_threshold` number — Minimum confidence threshold for detections and OCR results
  - `image` string, required — Base64 encoded image data
  - `inference_type` 'yolo' | 'ocr' | 'combined'
  - `nms_iou_threshold` number — IoU threshold for Non-Maximum Suppression (NMS)
  - `ocr_engine` string — OCR engine to use: 'free' or 'premium'

## Response `200`

Successful Response

- InferenceResponse
  - `analyzer_type` string — Analyzer type used
  - `data` InferenceData, required
    - `hash_result` HashResult
      - `ahash` string, required — Average hash of the content area
      - `content_bounds` ContentBounds
        - `bottom_y` integer, required — Bottom Y coordinate of content area (above nav bar)
        - `top_y` integer, required — Top Y coordinate of content area (below notification bar)
      - `dhash` string, required — Difference hash of the content area
      - `histogram` array[], nullable — RGB histogram (3 channels, 32 bins each)
        - integer[]
      - `phash` string, required — Perceptual hash of the content area
    - `icon_detections` Detection[] — Icon detections (YOLO)
      - `bbox` BoundingBox, required
        - `x1` number, required — Top-left x coordinate
        - `x2` number, required — Bottom-right x coordinate
        - `y1` number, required — Top-left y coordinate
        - `y2` number, required — Bottom-right y coordinate
      - `class_id` integer, required — Class ID of detected object
      - `class_name` string, required — Class name of detected object
      - `confidence` number, required — Detection confidence score
    - `metadata` InferenceMetadata, required
      - `icon_detections_after_nms` integer, required — Number of icon detections after NMS filtering
      - `icon_detections_before_nms` integer, required — Number of icon detections before NMS filtering
      - `image_height` integer, required — Input image height
      - `image_width` integer, required — Input image width
      - `inference_time_ms` number, required — Total inference time in milliseconds
      - `ocr_ns` integer, nullable — Nanoseconds spent in OCR
      - `queue_wait_ns` integer, nullable — Nanoseconds the job waited in the inference queue
      - `yolo_ns` integer, nullable — Nanoseconds spent in YOLO detection
    - `ocr_results` OCRResult[] — OCR text detections
      - `bbox` BoundingBox, required
        - `x1` number, required — Top-left x coordinate
        - `x2` number, required — Bottom-right x coordinate
        - `y1` number, required — Top-left y coordinate
        - `y2` number, required — Bottom-right y coordinate
      - `confidence` number, required — OCR confidence score
      - `text` string, required — Detected text content
  - `type` string — Response type

## Other responses

- `422` — Validation Error

## Changes

> 4 revisions in range; 1 could not be searched.

- **2026-07-18** `37afd3c77601` — 3 info
  - added the optional property `data/metadata/ocr_ns` to the response with the `200` status
  - added the optional property `data/metadata/queue_wait_ns` to the response with the `200` status
  - added the optional property `data/metadata/yolo_ns` to the response with the `200` status
- **2026-07-03** `93466e1dd588` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/axilioai/apis/argus/changes/api/v1/vision/detect/post.md)

---

[API](https://skmtc.dev/axilioai/apis/argus.md) · [All operations](https://skmtc.dev/axilioai/apis/argus/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/axilioai/argus/revisions/9977e34fbd8e/schema)
