Environments
List environments
List your organization’s environments and the pre-built h/ browsers.
GET
/
api
/
v2
/
environments
from hai_agents import Client
client = Client()
page = client.environments.list_environments()
print(page.items)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const page = await client.environments.listEnvironments();
console.log(page.items);
curl "https://agp.eu.hcompany.ai/api/v2/environments" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"items": [
{"id": "h/browser", "kind": "web", "host": "cloud", "start_url": "https://www.bing.com", "headless": false, "session_id": null, "mode": {"type": "visual", "width": 1200, "height": 1200, "markdown": false}, "lazy": false, "settle_s": 1.0, "vault_id": null, "browser_profile_id": null, "use_default_browser_profile": false, "persist_browser_profile": false, "network": null},
{"id": "h/textual_browser", "kind": "web", "host": "cloud", "start_url": "https://www.bing.com", "headless": false, "session_id": null, "mode": {"type": "text", "chunk_size": 20000}, "lazy": false, "settle_s": 1.0, "vault_id": null, "browser_profile_id": null, "use_default_browser_profile": false, "persist_browser_profile": false, "network": null}
],
"page": 1,
"total": 2
}
Query parameters
string
Case-insensitive substring match on the environment ID.
string
Only environments of this kind, for example
web or desktop.string
Case-insensitive substring match on the environment ID.
integer
default:"1"
Page number (1-based).
integer
default:"10"
Items per page. Maximum:
1000.string
default:"-created_at"
Sort order. Options:
created_at, -created_at, id, -id.Response
200 with a page envelope whose items are environment objects.
from hai_agents import Client
client = Client()
page = client.environments.list_environments()
print(page.items)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const page = await client.environments.listEnvironments();
console.log(page.items);
curl "https://agp.eu.hcompany.ai/api/v2/environments" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"items": [
{"id": "h/browser", "kind": "web", "host": "cloud", "start_url": "https://www.bing.com", "headless": false, "session_id": null, "mode": {"type": "visual", "width": 1200, "height": 1200, "markdown": false}, "lazy": false, "settle_s": 1.0, "vault_id": null, "browser_profile_id": null, "use_default_browser_profile": false, "persist_browser_profile": false, "network": null},
{"id": "h/textual_browser", "kind": "web", "host": "cloud", "start_url": "https://www.bing.com", "headless": false, "session_id": null, "mode": {"type": "text", "chunk_size": 20000}, "lazy": false, "settle_s": 1.0, "vault_id": null, "browser_profile_id": null, "use_default_browser_profile": false, "persist_browser_profile": false, "network": null}
],
"page": 1,
"total": 2
}
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
page = client.environments.list_environments()
print(page.items)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const page = await client.environments.listEnvironments();
console.log(page.items);
curl "https://agp.eu.hcompany.ai/api/v2/environments" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"items": [
{"id": "h/browser", "kind": "web", "host": "cloud", "start_url": "https://www.bing.com", "headless": false, "session_id": null, "mode": {"type": "visual", "width": 1200, "height": 1200, "markdown": false}, "lazy": false, "settle_s": 1.0, "vault_id": null, "browser_profile_id": null, "use_default_browser_profile": false, "persist_browser_profile": false, "network": null},
{"id": "h/textual_browser", "kind": "web", "host": "cloud", "start_url": "https://www.bing.com", "headless": false, "session_id": null, "mode": {"type": "text", "chunk_size": 20000}, "lazy": false, "settle_s": 1.0, "vault_id": null, "browser_profile_id": null, "use_default_browser_profile": false, "persist_browser_profile": false, "network": null}
],
"page": 1,
"total": 2
}