Skip to main content
POST
Locate In Screenshot
Find the element a natural-language query describes, such as "the blue Continue button", in a screenshot you supply. A vision-language model reads the image and answers in one of two ways when found is true:
  • A box. bbox is the element’s pixel box in the screenshot.
  • A matched text. When you send texts, the OCR results for the same screenshot, the model can answer with matched_text_index instead. It points into your texts list, so you reuse that entry’s exact box.
Argus does not run OCR for this operation. To ground answers in text, call Screenshots: detect first and pass its text results as texts unchanged: detect already returns each text box normalized to [0, 1] of the image, which is the form texts takes. Only the answer’s bbox is in pixels. Pass a model from Models: list, or omit it to use the default. The call is billed per token on that model, and the response reports prompt_tokens, completion_tokens, and cost_microdollars. If you already have the screen’s UI elements, for example from a DOM, use Elements: locate instead. It answers with one of your elements, which is exact where a box is approximate. Errors use the problem details shape.

Authorizations

X-Axilio-Api-Key
string
header
required

Axilio API key (axl_*).

Body

application/json

Argus POST /screenshots:locate request.

The caller pre-computes OCR via POST /screenshots:detect (or reuses cached results keyed by frame hash) and passes the text list here. Argus does NOT re-run OCR; the VLM call uses the provided texts as grounding context.

image
string
required

Base64 encoded image (PNG or JPEG)

Maximum string length: 16777216
query
string
required

Natural-language target description

Minimum string length: 1
model
string | null

VLM model to use; must be one of the models from GET /models. Omit to use the server's configured default. The system prompt is fixed to the element-locator task.

Minimum string length: 1
texts
TextElementInput · object[]

Pre-computed OCR text elements. Empty list means Argus skips OCR grounding and asks the VLM to locate from the image alone.

Response

Successful Response

Argus POST /screenshots:locate response.

Exactly one of matched_text_index or bbox is populated when found is True. matched_text_index indicates the VLM grounded its answer to a specific OCR text element (pixel-accurate bbox available via the original texts list). bbox is a free-form VLM bbox.

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 VLM located the target

latency_ms
integer
required

End-to-end VLM call latency

Required range: x >= 0
model
string
required

Model identifier returned by the provider

bbox
LocateBBox · object | null

Pixel-space bbox. None when matched_text_index is set or found=False.

completion_tokens
integer
default:0

Completion (output) tokens the model billed for this call

Required range: x >= 0
matched_text_index
integer | null

Index into the request texts list when the answer is OCR-grounded.

Required range: x >= 0
prompt_tokens
integer
default:0

Prompt (input) tokens the model billed for this call

Required range: x >= 0