Call it
curl https://api.peume.com/v1/call/browser-agent \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "your url",
"goal": "your goal"
}
}'const res = await fetch("https://api.peume.com/v1/call/browser-agent", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "your url",
"goal": "your goal"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/browser-agent",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "your url",
"goal": "your goal"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: browser-agent.
Parameters
urlRequiredstringTarget website URL to automate — must be an absolute URL including the scheme (a bare domain like 'example.com' is rejected). Example:
goalRequiredstringNatural language description of what to accomplish on the website. Be specific about the data to extract or the actions to take. Example: 'Extract every product name and price on page 1, return JSON'.
max_stepsintegerStep limit — the primary cost control: the run is billed per step, so capping steps bounds cost (see the pricing note on overshoot). The run stops at the cap and returns partial results with a note. Defaults to 150.
max_duration_secondsintegerSoft wall-clock budget in seconds — the agent honours it voluntarily and returns partial results when it runs out (elapsed time can overshoot ~2x). Use max_steps to bound cost. Example: 300.
profileIdstringAttach a Browser Context Profile YOU OWN (saved login state — provision one via /browser-profiles/provision, log in via /browser-profiles/setup-session, save it, then pass its id here). The run starts with the saved cookies/storage.
browser_profilestringBrowser build: 'lite' (standard, fast — default) or 'stealth' (anti-detection — for sites showing CAPTCHAs or 'Access Denied').
lite · stealth
proxy_configobjectRoute the browser through a proxy — pair with browser_profile: 'stealth' for protected sites.
output_schemaobjectOptional JSON-schema subset for the result shape (type/properties/required). Adherence is best-effort — always validate the returned result. Example: {"type": "object", "properties": {"title": {"type": "string"}}, "required": ["title"]}.
