Skip to main content
POST
Detect objects

Overview

The Detect API returns grounded object detections for a single image. Use it when you want a direct detection workflow without building a chat-completions prompt. Requests can include text categories, annotated positive exemplars, both together, or no targets for exhaustive object detection. You can also include negative_exemplars, but only alongside at least one category or positive exemplar. Coordinates for exemplar annotations and returned detections are image pixels.

Examples

Detect all objects as boxes

Omit categories and exemplars to ask the model to return the objects it finds in the image. This is useful for exploratory labeling or scene inventory. Box output is the default.
Box output example showing detected packages in a delivery van

Detect target categories as boxes

Pass categories when you know the labels you want returned. Each detection mention is one of the requested categories.

Detect one category as points

Set config.output to "point" when you want one pixel point per detection. With exactly one unique category and no exemplars, /v1/detect uses a direct point prompt and forces every returned mention to that category.

Detect all objects as points

You can also request point output without categories or exemplars. The route still uses exhaustive object detection internally, then returns the center point for each detected box or polygon.
Point output example showing centroid points for detected packages

Detect from exemplars as boxes

Use exemplars when the target is visual or domain-specific. Exemplar annotations use pixel coordinates in the exemplar image. If you omit categories, the exemplar annotation mention values define the target labels.

Detect from exemplars as points

For exemplar-guided point output, set config.output to "point". Positive exemplars can use either point or point_box annotations. The route uses the exemplar labels to find matching objects, then returns a point for each detection.

Configure reasoning

Use config.reasoning_effort with none, minimal, low, medium, or high. The default is none; minimal currently uses the same reasoning level as low. The setting belongs inside config on /v1/detect, unlike the top-level field on chat completions and Multilook. An unsupported value returns HTTP 400. The effect depends on the detection mode:
  • No categories or exemplars: a value other than none enables model reasoning, for either box or point output. The first example uses high. Reasoning stays internal; the response contains detections and finish_reason, without reasoning text.
  • Categories with box output, without positive or negative exemplars: a value other than none selects a detection workflow that can inspect additional image regions. It does not enable model reasoning, and the non-none tiers do not select different reasoning levels in this mode.
  • Category-based point output or any exemplar-guided request: the field is accepted, but model reasoning remains disabled and the selected tier does not change the detection workflow.
For older clients, config.enable_thinking remains a deprecated alias: true maps to high, and false maps to none. An explicit config.reasoning_effort takes precedence when both are supplied. For example, {"reasoning_effort": "none", "enable_thinking": true} keeps the resolved effort at none. Prefer sending only reasoning_effort.

Supported permutations

Example response

Box response

Point response

Notes

  • /v1/detect supports image inputs only.
  • config.output can be "box" or "point"; the default is "box". The public value is "box", not "bbox".
  • The response does not include confidence scores.
  • finish_reason is "complete" or "max_tokens".
  • When categories is set, every positive exemplar annotation mention must exactly match one of those categories.
  • Exemplar annotations must include exactly one of point or point_box.
  • Point outputs may come from parsed points directly, or from the centroid of a parsed box or polygon.
  • config.reasoning_effort does not change the response schema; its effect on detection depends on the request mode described above.

Limits

See the API reference below for the complete request and response schemas.

Authorizations

Authorization
string
header
required

Bearer token authentication using your Perceptron API key

Body

application/json
media
object
required
categories
string[] | null

Category names to detect. Entries must be non-empty and must not contain commas.

config
object
exemplars
object[] | null
negative_exemplars
object[] | null

Response

Detection completed successfully.

detections
object[]
required
finish_reason
enum<string>
required
Available options:
complete,
max_tokens