Skip to main content
GET
/
sandboxes
/
{sandboxName}
Get sandbox
curl --request GET \
  --url https://api.blaxel.ai/v0/sandboxes/{sandboxName} \
  --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"
    }
  ],
  "lastUsedAt": "<string>",
  "status": "DELETING"
}

Authorizations

Authorization
string
header
required

OAuth2 authentication with JWT tokens

Path Parameters

sandboxName
string
required

Unique name identifier of the sandbox

Query Parameters

show_secrets
boolean

Show secret values (requires workspace admin role)

Response

successful operation

Lightweight virtual machine for secure AI code execution. Sandboxes resume from standby in under 25ms and automatically scale to zero after inactivity, preserving memory state including running processes and filesystem.

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

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