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

Connect Lightning AI on Integrations, and CostGraph starts sandboxes in your Lightning AI account. You don’t run anything yourself.
  1. In CostGraph, go to Integrations > Sandbox > Lightning AI.
  2. Enter these fields:
    • API key (LIGHTNING_SANDBOX_API_KEY, required): A Lightning AI API key scoped to the teamspace sandboxes run in.
  3. Click Connect.

Your own dispatcher

To keep the key out of CostGraph or reach a private network, run your own dispatcher instead. Set provider to lightning and the preceding fields as environment variables, as described in Run your own dispatcher.

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)