---
title: "Detect Objects"
method: POST
path: "/v1/detect"
tags: ["detect"]
---

# Detect Objects

`POST /v1/detect`

## Request

- Base URL: `https://api.oxlo.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.oxlo.ai/v1/detect`
- Auth: HTTP bearer

Detect objects in an image using YOLO models.
When FOUNDRY_ENABLED=true, routes to Azure Foundry if available, otherwise falls back to T4 worker.

## Request body

- DetectionRequest: Object detection request.
  - `image` string, required: Base64 encoded image or URL
  - `model` string: YOLO model to use
  - `confidence` number: Confidence threshold
  - `iou_threshold` number: IoU threshold for NMS
  - `classes` string[], nullable: Filter by class names (e.g. ['person', 'car'])
  - `max_detections` integer, nullable: Maximum number of detections to return
  - `image_size` integer, nullable: Input image size for inference

## Response `200`

Successful Response

- DetectionResponse
  - `model` string, required
  - `detections` Detection[], required
    - `class_id` integer, required
    - `class_name` string, required
    - `confidence` number, required
    - `bbox` BoundingBox, required
      - `x1` number, required
      - `y1` number, required
      - `x2` number, required
      - `y2` number, required
  - `count` integer, required
  - `processing_time_ms` number, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oxlo/apis/oxlo-backend.md) - [All operations](https://skmtc.dev/oxlo/apis/oxlo-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/oxlo/apis/oxlo-backend/revisions/bc2ecdc94f31?raw)
