Skip to main content
public preview

These docs are a public preview. The endpoint reference is still firming up as the API host is finalized.

Instances API

Spawn, list, and destroy isolated browser instances.

Overview

The Instances API creates, lists, and destroys isolated browser instances. Each instance is a secure, ephemeral browsing environment. It stays fully isolated from your infrastructure.

List Instances

GEThttps://{your-api-host}/orgs/{org_uuid}/api/instances

Retrieve a list of all running instances for your organization.

Request Example

curl -X GET "https://{your-api-host}/orgs/{org_uuid}/api/instances" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response Example

{
  "instances": [
    {
      "instance_uuid": "1234-5678-90ab-cdef",
      "status": "running",
      "image": "ubuntu-20.04",
      "size": "small",
      "created_at": "2025-01-10T12:00:00Z",
      "access_url": "https://instance-1234-5678.legba.app"
    },
    {
      "instance_uuid": "abcd-efgh-ijkl-mnop",
      "status": "running",
      "image": "windows-10",
      "size": "medium",
      "created_at": "2025-01-10T11:30:00Z",
      "access_url": "https://instance-abcd-efgh.legba.app"
    }
  ],
  "total": 2
}

Create Instance

POSThttps://{your-api-host}/orgs/{org_uuid}/api/instances

Create a new isolated browser instance.

Request Body Parameters

Request Body Parameters
ParameterTypeDescription
imagerequired
string

The browser image to use for the instance (e.g., ubuntu-20.04, windows-10)

Example: ubuntu-20.04

sizerequired
string

The size of the instance. Available sizes: small, medium, large

Example: small

Request Example

curl -X POST "https://{your-api-host}/orgs/{org_uuid}/api/instances" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "ubuntu-20.04",
    "size": "small"
  }'

Response Example

{
  "instance_uuid": "1234-5678-90ab-cdef",
  "status": "running",
  "image": "ubuntu-20.04",
  "size": "small",
  "created_at": "2025-01-10T12:00:00Z",
  "access_url": "https://instance-1234-5678.legba.app"
}

Response Fields

Response Fields
ParameterTypeDescription
instance_uuid
string

Unique identifier for the instance

Example: 1234-5678-90ab-cdef

status
string

Current status of the instance (running, stopped, terminated)

Example: running

image
string

The browser image used for this instance

Example: ubuntu-20.04

size
string

The size of the instance

Example: small

created_at
string

ISO 8601 timestamp of when the instance was created

Example: 2025-01-10T12:00:00Z

access_url
string

URL to access the isolated browser instance

Example: https://instance-1234-5678.legba.app

Destroy Instance

DELETEhttps://{your-api-host}/orgs/{org_uuid}/api/instances/{instance_uuid}

Terminate and permanently delete a specific instance.

warning

This action is irreversible. All data associated with the instance is permanently deleted.

Request Example

curl -X DELETE "https://{your-api-host}/orgs/{org_uuid}/api/instances/{instance_uuid}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response: 204 No Content on successful deletion.