Skip to main content
POST
Locate Element
Choose the UI element that a natural-language query describes from a list of elements you already have. You send the candidates, and Argus answers with one of your element id values as element_id, or found: false. It never answers with a point, so you act on the element itself.

Why elements and screenshots are separate operations

Screenshot grounding and element grounding take different inputs and give different answers. A screenshot locate reads pixels and returns a box. An element locate reads structured elements and returns an element ID. Keeping them as separate operations gives each one a request and response that fit it exactly. The element operation doesn’t care where your elements came from. A browser DOM, the results of Screenshots: detect, or any other UI tree all map onto the same shape: an id, a role, a name, an optional value, optional pixel bounds, and an optional platform object of native attributes, which Argus passes to the model as given.

Request

  • query describes the target, such as "the Sign in button". Up to 2,000 characters.
  • elements holds 1 to 2,000 candidates. Each id must be unique in the request; a duplicate is a validation error. An id is at most 256 characters, a role at most 64, a name or value at most 1,024, and a platform object at most 4 KiB as JSON.
  • image is an optional base64 PNG or JPEG screenshot. When you send one, give bounds in that screenshot’s pixel space.
  • model is an optional vision-language model from Models: list. Omit it to use the default.

Response

found tells you whether the model chose an element. When it did, element_id is one of the IDs you sent. Argus checks the answer against your request, so an ID you didn’t send comes back as not found rather than as a guess. confidence is the model’s own estimate from 0 to 1.

Billing

Element locate is billed per token on the model it ran, the same way as Screenshots: locate. Usage rows label it with the endpoint element_locate. See Usage. Errors use the problem details shape.

Authorizations

X-Axilio-Api-Key
string
header
required

Axilio API key (axl_*).

Body

application/json

Argus POST /elements:locate request.

Grounds a natural-language query in a list of UI elements: the model picks one of elements. The screenshot is optional context; the answer is always an element, never a point.

elements
Element · object[]
required

Candidate elements

Required array length: 1 - 2000 elements
query
string
required

Natural-language target description

Required string length: 1 - 2000
image
string | null

Optional base64 screenshot (PNG or JPEG) the element bounds are in

Maximum string length: 16777216
model
string | null

VLM model to use; must be one of the models from GET /models. Omit to use the server's configured default.

Minimum string length: 1

Response

Successful Response

Argus POST /elements:locate response.

element_id is one of the request's element ids when found, else null. It names the element rather than indexing the list, so the answer does not depend on element order. The billing fields match screenshot locate.

confidence
number
required

Model self-reported confidence

Required range: 0 <= x <= 1
cost_microdollars
integer
required

Provider-reported cost in microdollars

Required range: x >= 0
found
boolean
required

Whether the model picked an element

latency_ms
integer
required

End-to-end VLM call latency

Required range: x >= 0
model
string
required

Model identifier returned by the provider

completion_tokens
integer
default:0

Completion (output) tokens the model billed for this call

Required range: x >= 0
element_id
string | null

The chosen element's id; null when not found

prompt_tokens
integer
default:0

Prompt (input) tokens the model billed for this call

Required range: x >= 0