Skip to main content
CodeSandbox SDK (now part of Together AI) programmatically creates and runs Firecracker-based VM sandboxes billed to a CodeSandbox workspace. The following table shows what CostGraph runs on this provider.

Connect

Connect CodeSandbox on Integrations, and CostGraph starts sandboxes in your CodeSandbox account. You don’t run anything yourself.
  1. In CostGraph, go to Integrations > Sandbox > CodeSandbox.
  2. Enter these fields:
    • API token (CSB_API_KEY, required): A CodeSandbox workspace API token from codesandbox.io/t/api.
  3. Click Connect.
For CI runners, CostGraph picks the smallest VM tier that fits the job.

Your own dispatcher

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

Key and permissions

CSB_API_KEY is a CodeSandbox workspace API token, created at https://codesandbox.io/t/api with ‘Create API Token’; it is revoked from the Permissions tab of Workspace Settings. Sandboxes are created and billed in the token’s workspace. Tokens are scoped (scopes in the vendor API: sandbox_create, sandbox_read, sandbox_edit_code, vm_manage), but CodeSandbox does not document a per-operation minimum; its SDK quickstart says to “enable all scopes”. Sources: codesandbox.io: sdk, codesandbox.io: api, codesandbox.io: sandboxes, codesandbox.io: key terms, codesandbox.io: faq.

Limits

  • Hibernation timeout configurable from 1 minute to 24 hours; default 5 minutes on free and 30 minutes on paid workspaces (from the vendor sandboxes page; the page blocks automated fetching, read via search-index excerpt). (source)
  • VM tiers from Micro up to Small (8 cores / 16 GB) by default, higher tiers only via custom templates; available tiers depend on the workspace subscription (same caveat as above). (source)