Skip to main content

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")

Execute code

client.compute.sandbox.execute(
    sandbox["vm_id"],
    code="print(1 + 1)",
    language="python"
)

Run shell commands

hexel compute sandbox exec <vm-id> --command "ls -la /workspace"

Lifecycle

OperationDescription
CreateAllocate a sandbox
ExecuteRun code or shell commands
RenewExtend the TTL (default is 1 hour)
ReleaseRelease the sandbox
DeletePermanently remove the sandbox