Skip to main content
Lightning AI Sandbox gives each workload its own isolated, on-demand Linux environment with its own filesystem, network stack and dedicated compute, which you create and control programmatically. The following table shows what CostGraph runs on this provider. CI runners: no. AutoPilot compares runners by price, and this provider publishes no sandbox price.

Connect

Run the dispatcher with provider set to lightning and these variables:
  • LIGHTNING_SANDBOX_API_KEY or LIGHTNING_API_KEY

Key and permissions

LIGHTNING_SANDBOX_API_KEY (preferred; LIGHTNING_API_KEY is the legacy fallback) is a Lightning AI API key. Create it in settings under Members > API keys > Create API Key, choosing a role and the teamspace to scope it to. The key alone selects the teamspace. Partly documented: use a teamspace-scoped (project-scoped) key. With an org-scoped key, sandbox creation works but snapshot and persistence calls fail. Key creation asks for a role, but the docs do not say which role is the minimum for sandboxes (the RBAC page lists Admin, Member and Guest without mentioning API keys). Sources: lightning.ai: sandbox, lightning.ai: sandbox, lightning.ai: js sandbox sdk, lightning.ai: role based access controls.

Limits

  • The timeout option at create is the initial auto-stop deadline in ms (0 = no timeout). extendTimeout(ms) adds to it (minimum 1000 ms). No default or maximum is documented. (source)
  • Machine slugs: cpu-1 1 vCPU/1 GB, cpu-2 2/8 GB, cpu-4 4/16 GB, cpu-8 8/32 GB, cpu-16 16/64 GB. (source)
  • Sandboxes are persistent: they save their state on stop and resume where they left off. The docs do not state regions, CPU architecture or preview status. (source)