Browser profiles
Get the default browser profile
Get the browser profile sessions load when they ask for the default.
GET
/
api
/
v2
/
browser-profiles
/
default
from hai_agents import Client
client = Client()
profile = client.browser_profiles.get_default_browser_profile(browser_name="chromium")
print(profile.id, profile.name)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const profile = await client.browserProfiles.getDefaultBrowserProfile({
browserName: "chromium",
});
console.log(profile.id, profile.name);
curl "https://agp.eu.hcompany.ai/api/v2/browser-profiles/default?browser_name=chromium" \
-H "Authorization: Bearer $HAI_API_KEY"
Behavior
The response is404 when no default profile exists yet for that browser. A default doesn’t have to be set explicitly: if none exists, the first session whose Cloud browser sets use_default_browser_profile: true creates an empty one.
Query parameters
string
required
Browser flavor to look up the default for, for example
chromium.Response
200 with the profile object.
from hai_agents import Client
client = Client()
profile = client.browser_profiles.get_default_browser_profile(browser_name="chromium")
print(profile.id, profile.name)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const profile = await client.browserProfiles.getDefaultBrowserProfile({
browserName: "chromium",
});
console.log(profile.id, profile.name);
curl "https://agp.eu.hcompany.ai/api/v2/browser-profiles/default?browser_name=chromium" \
-H "Authorization: Bearer $HAI_API_KEY"
Errors
| Status | Cause |
|---|---|
404 | No default profile exists for this browser yet. |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
profile = client.browser_profiles.get_default_browser_profile(browser_name="chromium")
print(profile.id, profile.name)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const profile = await client.browserProfiles.getDefaultBrowserProfile({
browserName: "chromium",
});
console.log(profile.id, profile.name);
curl "https://agp.eu.hcompany.ai/api/v2/browser-profiles/default?browser_name=chromium" \
-H "Authorization: Bearer $HAI_API_KEY"