Skip to main content
GET
/
sandboxes
List sandboxes
curl --request GET \
  --url https://api.blaxel.ai/v0/sandboxes \
  --header 'Authorization: Bearer <token>'
[
  {
    "metadata": {
      "name": "my-resource",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "createdBy": "<string>",
      "updatedBy": "<string>",
      "displayName": "My Resource",
      "labels": {},
      "plan": "<string>",
      "url": "<string>",
      "workspace": "<string>"
    },
    "spec": {
      "enabled": true,
      "lifecycle": {
        "expirationPolicies": [
          {
            "action": "delete",
            "type": "ttl-idle",
            "value": "24h"
          }
        ]
      },
      "region": "us-pdx-1",
      "runtime": {
        "envs": [
          {
            "name": "MY_ENV_VAR",
            "secret": true,
            "value": "my-value"
          }
        ],
        "expires": "2025-12-31T23:59:59Z",
        "image": "blaxel/base-image:latest",
        "memory": 4096,
        "ports": [
          {
            "target": 8080,
            "name": "http",
            "protocol": "HTTP"
          }
        ],
        "ttl": "24h"
      },
      "volumes": [
        {
          "mountPath": "/mnt/data",
          "name": "my-volume",
          "readOnly": false
        }
      ]
    },
    "events": [
      {
        "canaryRevision": "<string>",
        "message": "Deployment successful",
        "revision": "rev-abc123",
        "status": "DEPLOYED",
        "time": "2025-01-15T10:30:00Z",
        "type": "deployment"
      }
    ],
    "expiresIn": 123,
    "lastUsedAt": "<string>",
    "status": "DELETING"
  }
]

Authorizations

Authorization
string
header
required

OAuth2 authentication with JWT tokens

Response

successful operation

metadata
object
required

Common metadata fields shared by all Blaxel resources including name, labels, timestamps, and ownership information

spec
object
required

Configuration for a sandbox including its image, memory, ports, region, and lifecycle policies

events
object[]

Events happening on a resource deployed on Blaxel

expiresIn
integer

Time in seconds until the sandbox is automatically deleted based on TTL and lifecycle policies. Only present for sandboxes with lifecycle configured.

lastUsedAt
string

Last time the sandbox was used (read-only, managed by the system)

status
enum<string>

Deployment status of a resource deployed on Blaxel

Available options:
DELETING,
TERMINATED,
FAILED,
DEACTIVATED,
DEACTIVATING,
UPLOADING,
BUILDING,
DEPLOYING,
DEPLOYED