Skip to main content
POST
Start environment

Authorizations

X-Api-Key
string
header
required

Body

application/json

Request to start an environment. An environment belongs to an organisation; the agent is an optional binding carried in the body, not a path segment. With an agent, the environment is stamped external-owned and the agent's workflow/profile drive provisioning; without one, it is organization-owned and provisions from the explicit spec alone.

organizationId
string<uuid>
required

The organisation the environment belongs to. Required even when an agent is given — the server verifies the agent belongs to it, so a mismatched binding fails instead of stamping the wrong organisation.

agentId
string<uuid>

The agent to bind the environment to. Gates access to that agent's workflow. Omit for an organization-owned environment with no agent binding.

agentProfileId
string<uuid>

Optional agent profile to attach. The profile id is stamped onto the env row for the session's lifetime, so later reads resolve against the stamped profile rather than the agent's current one. Its decrypted credentials come back on the response's connection only for service-to-service callers — they are never returned to an API key or a browser.

source
object

Where the environment spec comes from. Omit for the server default (a browser env at the computer-use resolution). The workflow arm needs an agent to resolve against, so it requires agentId.

Response

The request has succeeded.

A single environment: what it is, its provider state, and how to drive it. state is the same shape the execution endpoint returns, so the LiveView/OsLiveView components render either without branching.

connection
object
required

How to connect to it.

createdAt
string<date-time>
required

When the environment row was created.

environmentType
enum<string>
required

Browser or OS.

Available options:
browser,
os
expiresAt
string<date-time>
required

When the reaper will tear the environment down if no graceful Stop arrives first.

hasRecording
boolean
required

Whether a playable recording has been persisted (GCS object or provider URL). The playable URL itself is minted on the by-id read.

id
string<uuid>
required

Environment identifier.

organizationId
string<uuid>
required

The organisation the environment belongs to.

owner
object
required

Who the environment belongs to, and the identity that owner carries.

state
object
required

Environment state (browser or OS): live-view URL, viewport, provider config and a freshly-minted recording URL when one exists.

status
enum<string>
required

Current status, terminal states included. Lists exclude terminal environments unless includeTerminal is set.

Available options:
requested,
provisioning,
ready,
stopping,
stopped,
failed,
dead
agentProfileId
string<uuid>

Profile snapshot the environment was booted against, if any.

osType
enum<string>

Operating system for OS environments. Absent for browser environments; linux when an OS environment predates explicit osType storage.

Available options:
linux,
windows
readyAt
string<date-time>

When the environment first became ready, if it reached that state.

stoppedAt
string<date-time>

When the environment reached a terminal state. Set after Stop runs.