Documentation Index
Fetch the complete documentation index at: https://hexelstudio.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Sandboxes are isolated execution environments available on demand. Use them for code execution, file operations, and shell commands.
Create a sandbox
from hexel import Hexel
client = Hexel(api_key="your_api_key")
sandbox = client.compute.sandbox.create(tier="standard")
hexel compute sandbox create --tier standard
curl -X POST https://compute.hexelstudio.com/compute/v1/vms/allocate \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"tier": "standard"}'
Execute code
client.compute.sandbox.execute(
sandbox["vm_id"],
code="print(1 + 1)",
language="python"
)
hexel compute sandbox exec <vm-id> --code "print(1 + 1)"
Run shell commands
hexel compute sandbox exec <vm-id> --command "ls -la /workspace"
curl -X POST https://compute.hexelstudio.com/compute/v1/vms/<vm-id>/execute \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"command": "ls -la /workspace"}'
Lifecycle
| Operation | Description |
|---|
| Create | Allocate a sandbox |
| Execute | Run code or shell commands |
| Renew | Extend the TTL (default is 1 hour) |
| Release | Release the sandbox |
| Delete | Permanently remove the sandbox |