---
title: "Detect Screenshot"
method: POST
path: "/api/v1/screenshots:detect"
tags: ["Screenshots"]
---

# Detect Screenshot

`POST /api/v1/screenshots:detect`

## Request

- Base URL: `https://argus.axilio.ai`
- URL: `https://argus.axilio.ai/api/v1/screenshots:detect`
- Auth: API key in header `X-Axilio-Api-Key`
- TypeScript: <https://skmtc.dev/axilioai/apis/argus-2/docs/api/v1/screenshots:detect/post.ts> (a function with typed inputs; its response is checked against the schema)

Detect UI elements and read text in a screenshot.

## Request body

- InferenceRequest
  - `confidence_threshold` number: Minimum confidence threshold for detections and OCR results
  - `image` string, required: Base64 encoded image data
  - `inference_type` 'detect' | 'ocr' | 'combined'
  - `nms_iou_threshold` number: IoU threshold for Non-Maximum Suppression (NMS)
  - `ocr_engine` 'free' | 'premium': 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
      - `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
      - `detect_ns` integer, nullable: Nanoseconds spent in icon detection
      - `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
    - `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

- `400`: Invalid input (bad image, unsupported model)
- `401`: Missing or invalid credential
- `402`: Insufficient balance
- `422`: Request validation failed
- `500`: Internal error (masked)
- `502`: The model provider failed

## Changes

- **2026-10-24** `62a8af730680`: 1 breaking, 2 info
  - request property `ocr_engine` was restricted to a list of enum values
  - added the new `free` enum value to the request property `ocr_engine`
  - added the new `premium` enum value to the request property `ocr_engine`
- **2026-10-17** `2e42e4860799`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/axilioai/apis/argus-2/changes/api/v1/screenshots:detect/post.md)

---

[API](https://skmtc.dev/axilioai/apis/argus-2.md) - [All operations](https://skmtc.dev/axilioai/apis/argus-2/llms.txt) - [OpenAPI document](https://skmtc.dev/axilioai/apis/argus-2/revisions/62a8af730680?raw)
