Get account queue status
curl --request GET \
--url https://api.pre.dev/browser-agent-status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pre.dev/browser-agent-status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pre.dev/browser-agent-status', 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://api.pre.dev/browser-agent-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pre.dev/browser-agent-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pre.dev/browser-agent-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pre.dev/browser-agent-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"running": 2,
"claimed": 0,
"pending": 3,
"total": 5,
"cap": 25
}
Browser Agents
Get your queue status
Inspect pending and running tasks and the in-flight ceiling for your account.
GET
/
browser-agent-status
Get account queue status
curl --request GET \
--url https://api.pre.dev/browser-agent-status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pre.dev/browser-agent-status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pre.dev/browser-agent-status', 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://api.pre.dev/browser-agent-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pre.dev/browser-agent-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pre.dev/browser-agent-status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pre.dev/browser-agent-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"running": 2,
"claimed": 0,
"pending": 3,
"total": 5,
"cap": 25
}
curl --fail-with-body https://api.pre.dev/browser-agent-status \
-H "Authorization: Bearer $PREDEV_API_KEY"
| Field | Meaning |
|---|---|
pending | Tasks waiting to start |
claimed | Tasks assigned for execution |
running | Tasks running |
total | Pending + claimed + running tasks counted by this snapshot |
cap | Your account’s current in-flight ceiling |
Size a submission
A request’s task count must fit your available in-flight capacity as well as the service’s batch-size limit. Loweringconcurrency does not reduce how many submitted tasks count against the cap.
For example, a snapshot with cap: 25 and total: 20 suggests room for five tasks. Submit a small batch, then wait for capacity to free before sending the next one. Treat the snapshot as advisory: it is not a reservation, and the submission gate can still return QUEUE_FULL.
The cap depends on the plan and service configuration. Read cap rather than hard-coding a number or assuming the 1,000-task request ceiling is your account limit.
Node: client.browserAgentStatus(). Python: client.browser_agent_status() returns a dictionary. Service capacity is a separate endpoint and does not replace your account’s cap.
Errors
| Status | When |
|---|---|
401 | Missing or invalid key |
500 | Unexpected error |
Authorizations
apiKeyAuthxApiKey
Your pre.dev workspace API key (pdk_...) from Integrations, Built-in tab: https://pre.dev/projects/integrations?tab=built-in
Was this page helpful?

