Browser Agents
Get service capacity
Read advisory service queue statistics; use account queue status to size your own submissions.
curl --fail-with-body https://api.pre.dev/browser-agent-capacity \
-H "Authorization: Bearer $PREDEV_API_KEY"This endpoint returns service-level queue and execution statistics. Fields include totalActive, maxSandboxes, pending, claimed, running, failed, utilization (percentage), and oldestQueuedAgeMs.
The response is an advisory operational snapshot, not an admission guarantee or a forecast. Additional diagnostic fields may be returned. Use GET /browser-agent-status and its cap field for your account’s current limit; the service snapshot’s perUserCap is a legacy field.
There is no dedicated method in the current SDKs or product MCP tools; call the endpoint with direct HTTP when needed.
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.
curl -X GET "https://api.pre.dev/browser-agent-capacity"fetch("https://api.pre.dev/browser-agent-capacity", { method: "GET"})package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.pre.dev/browser-agent-capacity" 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-capacity"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-capacity")) .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-capacity");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-capacity"; let res = client .get(url) .send() .await? .text() .await?; println!("{}", res); Ok(())}{ "totalActive": 64, "maxSandboxes": 200, "perUserCap": 50, "pending": 12, "running": 60, "claimed": 4, "failed": 0, "utilization": 32, "oldestQueuedAgeMs": 1800}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
Service capacity snapshot.
TypeScript Definitions
Use the response body type in TypeScript.
Advisory service diagnostics. Fields may change; perUserCap is a legacy global value, not your account limit. Use GET /browser-agent-status for your cap.
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.