Create an environment
Environments
Create an environment
Create a reusable environment in your own catalog.
POST
Create an environment
Creates a new custom environment in your catalog. Once created, reference it by
id (e.g. "environments": ["wide-browser"]) from any agent. Most users define environments inline on the agent instead; use this endpoint to reuse one environment across several agents.
Returns 201 with the created Environment object.
Request body
The body is a Browser spec.Catalog identifier, kebab-case with an optional single
org/ namespace prefix. The h/ prefix is reserved for H employees (rejected with 403 otherwise). Immutable after creation.Environment type. Currently only
web. Defaults to web.Viewport width in pixels. Must be a positive integer.
Viewport height in pixels. Must be a positive integer.
Initial URL to open.
How the agent perceives and drives the browser:
visual (default), multimodal, or text. See Modes.Characters of page text shown per page in
text mode. Rejected in other modes.Id of a vault to bind to this browser, letting the agent sign in to sites with secrets resolved from the vault. Must reference a vault in your organization. Omit to run without secret access.
Id of a browser profile to load into this browser, restoring saved cookies and storage so the agent starts the session already signed in. Must reference a profile in your organization. Omit to start with a fresh profile.
Network settings for the browser session. Holds a single field,
proxy_url: a bring-your-own HTTP/HTTPS/SOCKS proxy URL for browser egress, with any credentials inline (e.g. http://user:pass@host:port). Only headful chromium sessions support a proxy; ignored when session_id attaches to an existing session. See Proxy.Examples
Response
Errors
| Status | Cause |
|---|---|
403 | Attempted to use the reserved h/ namespace without H employee privileges. |
409 | An environment with this id already exists in your catalog. |
422 | Body fails validation; common cases: invalid id shape, missing required field. |