Locate Element
Find the element a query describes among the given UI elements.
Answers with one of the request’s element ids, or not found; never a point.
curl --request POST \
--url https://argus.axilio.ai/api/v1/elements:locate \
--header 'Content-Type: application/json' \
--header 'X-Axilio-Api-Key: <api-key>' \
--data '
{
"elements": [
{
"id": "<string>",
"role": "<string>",
"bounds": {
"height": 1,
"width": 1,
"x": 123,
"y": 123
},
"name": "",
"platform": {},
"value": "<string>"
}
],
"query": "<string>",
"image": "<string>",
"model": "<string>"
}
'import requests
url = "https://argus.axilio.ai/api/v1/elements:locate"
payload = {
"elements": [
{
"id": "<string>",
"role": "<string>",
"bounds": {
"height": 1,
"width": 1,
"x": 123,
"y": 123
},
"name": "",
"platform": {},
"value": "<string>"
}
],
"query": "<string>",
"image": "<string>",
"model": "<string>"
}
headers = {
"X-Axilio-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Axilio-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
elements: [
{
id: '<string>',
role: '<string>',
bounds: {height: 1, width: 1, x: 123, y: 123},
name: '',
platform: {},
value: '<string>'
}
],
query: '<string>',
image: '<string>',
model: '<string>'
})
};
fetch('https://argus.axilio.ai/api/v1/elements:locate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://argus.axilio.ai/api/v1/elements:locate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'elements' => [
[
'id' => '<string>',
'role' => '<string>',
'bounds' => [
'height' => 1,
'width' => 1,
'x' => 123,
'y' => 123
],
'name' => '',
'platform' => [
],
'value' => '<string>'
]
],
'query' => '<string>',
'image' => '<string>',
'model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Axilio-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://argus.axilio.ai/api/v1/elements:locate"
payload := strings.NewReader("{\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"role\": \"<string>\",\n \"bounds\": {\n \"height\": 1,\n \"width\": 1,\n \"x\": 123,\n \"y\": 123\n },\n \"name\": \"\",\n \"platform\": {},\n \"value\": \"<string>\"\n }\n ],\n \"query\": \"<string>\",\n \"image\": \"<string>\",\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Axilio-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://argus.axilio.ai/api/v1/elements:locate")
.header("X-Axilio-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"role\": \"<string>\",\n \"bounds\": {\n \"height\": 1,\n \"width\": 1,\n \"x\": 123,\n \"y\": 123\n },\n \"name\": \"\",\n \"platform\": {},\n \"value\": \"<string>\"\n }\n ],\n \"query\": \"<string>\",\n \"image\": \"<string>\",\n \"model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://argus.axilio.ai/api/v1/elements:locate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Axilio-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"role\": \"<string>\",\n \"bounds\": {\n \"height\": 1,\n \"width\": 1,\n \"x\": 123,\n \"y\": 123\n },\n \"name\": \"\",\n \"platform\": {},\n \"value\": \"<string>\"\n }\n ],\n \"query\": \"<string>\",\n \"image\": \"<string>\",\n \"model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"confidence": 0.5,
"cost_microdollars": 1,
"found": true,
"latency_ms": 1,
"model": "<string>",
"completion_tokens": 0,
"element_id": "<string>",
"prompt_tokens": 0
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}Authorizations
Axilio API key (axl_*).
Body
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.
Candidate elements
1 - 2000 elementsShow child attributes
Show child attributes
Natural-language target description
1 - 2000Optional base64 screenshot (PNG or JPEG) the element bounds are in
16777216VLM model to use; must be one of the models from GET /models. Omit to use the server's configured default.
1Response
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.
Model self-reported confidence
0 <= x <= 1Provider-reported cost in microdollars
x >= 0Whether the model picked an element
End-to-end VLM call latency
x >= 0Model identifier returned by the provider
Completion (output) tokens the model billed for this call
x >= 0The chosen element's id; null when not found
Prompt (input) tokens the model billed for this call
x >= 0curl --request POST \
--url https://argus.axilio.ai/api/v1/elements:locate \
--header 'Content-Type: application/json' \
--header 'X-Axilio-Api-Key: <api-key>' \
--data '
{
"elements": [
{
"id": "<string>",
"role": "<string>",
"bounds": {
"height": 1,
"width": 1,
"x": 123,
"y": 123
},
"name": "",
"platform": {},
"value": "<string>"
}
],
"query": "<string>",
"image": "<string>",
"model": "<string>"
}
'import requests
url = "https://argus.axilio.ai/api/v1/elements:locate"
payload = {
"elements": [
{
"id": "<string>",
"role": "<string>",
"bounds": {
"height": 1,
"width": 1,
"x": 123,
"y": 123
},
"name": "",
"platform": {},
"value": "<string>"
}
],
"query": "<string>",
"image": "<string>",
"model": "<string>"
}
headers = {
"X-Axilio-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Axilio-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
elements: [
{
id: '<string>',
role: '<string>',
bounds: {height: 1, width: 1, x: 123, y: 123},
name: '',
platform: {},
value: '<string>'
}
],
query: '<string>',
image: '<string>',
model: '<string>'
})
};
fetch('https://argus.axilio.ai/api/v1/elements:locate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://argus.axilio.ai/api/v1/elements:locate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'elements' => [
[
'id' => '<string>',
'role' => '<string>',
'bounds' => [
'height' => 1,
'width' => 1,
'x' => 123,
'y' => 123
],
'name' => '',
'platform' => [
],
'value' => '<string>'
]
],
'query' => '<string>',
'image' => '<string>',
'model' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Axilio-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://argus.axilio.ai/api/v1/elements:locate"
payload := strings.NewReader("{\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"role\": \"<string>\",\n \"bounds\": {\n \"height\": 1,\n \"width\": 1,\n \"x\": 123,\n \"y\": 123\n },\n \"name\": \"\",\n \"platform\": {},\n \"value\": \"<string>\"\n }\n ],\n \"query\": \"<string>\",\n \"image\": \"<string>\",\n \"model\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Axilio-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://argus.axilio.ai/api/v1/elements:locate")
.header("X-Axilio-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"role\": \"<string>\",\n \"bounds\": {\n \"height\": 1,\n \"width\": 1,\n \"x\": 123,\n \"y\": 123\n },\n \"name\": \"\",\n \"platform\": {},\n \"value\": \"<string>\"\n }\n ],\n \"query\": \"<string>\",\n \"image\": \"<string>\",\n \"model\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://argus.axilio.ai/api/v1/elements:locate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Axilio-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"role\": \"<string>\",\n \"bounds\": {\n \"height\": 1,\n \"width\": 1,\n \"x\": 123,\n \"y\": 123\n },\n \"name\": \"\",\n \"platform\": {},\n \"value\": \"<string>\"\n }\n ],\n \"query\": \"<string>\",\n \"image\": \"<string>\",\n \"model\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"confidence": 0.5,
"cost_microdollars": 1,
"found": true,
"latency_ms": 1,
"model": "<string>",
"completion_tokens": 0,
"element_id": "<string>",
"prompt_tokens": 0
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}{
"code": "<string>",
"detail": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"type": "about:blank"
}