Skip to main content

Build and wait for completion

The build method builds the template and waits for the build to complete. It returns build information including the template ID and build ID.

Minimum free disk space

Use minFreeDiskMb in JavaScript or min_free_disk_mb in Python to request minimum free disk space after the template’s build steps finish. This option is available in the JavaScript and Python SDKs starting with version 2.49.0, including Python’s sync and async build methods.
  • Omit the option to use your team’s default.
  • Set it to 0 to request no minimum free disk growth.
  • Set a positive integer to request that much free space, in MiB.
With CLI version 2.19.0 or later, use:
This is a free-space target for a template build, not a total disk-size setting or an option on Sandbox.create. The resulting filesystem includes space used by the template as well as its free space. diskSizeMB is an API response field, not a build input. See Build limits for tier limits.

Build in background

The buildInBackground method starts the build process and returns immediately without waiting for completion. This is useful when you want to trigger a build and check its status later.

Check build status

Use getBuildStatus to check the status of a build started with buildInBackground.

Example: Background build with status polling