Browser Agents
Get your queue status
Inspect pending and running tasks and the in-flight ceiling for your account.
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. Lowering concurrency 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 |
Each status has an example body in the response examples. See errors and retries.
Your pre.dev workspace API key (pdk_...) from Integrations, Built-in tab: https://pre.dev/projects/integrations?tab=built-in
In: header
Response Body
application/json
Account queue snapshot.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Missing, invalid, or ineligible authentication.
TypeScript Definitions
Use the response body type in TypeScript.
application/json
Request failed.
TypeScript Definitions
Use the response body type in TypeScript.
curl -X GET "https://api.pre.dev/browser-agent-status"fetch("https://api.pre.dev/browser-agent-status", { method: "GET"})package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.pre.dev/browser-agent-status" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}import requestsurl = "https://api.pre.dev/browser-agent-status"response = requests.request("GET", url)print(response.text)import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.http.HttpResponse.BodyHandlers;import java.time.Duration;HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build();HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() .uri(URI.create("https://api.pre.dev/browser-agent-status")) .GET() .build();try { HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString()); System.out.println("Status code: " + response.statusCode()); System.out.println("Response body: " + response.body());} catch (Exception e) { e.printStackTrace();}using System;using System.Net.Http;using System.Text;var client = new HttpClient();var response = await client.GetAsync("https://api.pre.dev/browser-agent-status");var responseBody = await response.Content.ReadAsStringAsync();use reqwest::{Result, Client};async fn main() -> Result<()> { let client = Client::new(); let url = "https://api.pre.dev/browser-agent-status"; let res = client .get(url) .send() .await? .text() .await?; println!("{}", res); Ok(())}{ "running": 2, "claimed": 0, "pending": 3, "total": 5, "cap": 25}
