Skip to main content
A sandbox keeps running until its timeout expires or until you stop it manually. By default, a new sandbox stays alive for 5 minutes. You can set a different timeout when creating the sandbox, update the timeout while it is running, inspect sandbox information, or kill it when you are done.

Create a sandbox with a timeout

Set the timeout at creation time when you know how long the work should run.

Update the timeout

You can use the setTimeout method to reset how much longer the sandbox should stay alive. This is useful when user activity continues after the original timeout would have expired.

Get sandbox information

You can use the getInfo method in JavaScript or get_info method in Python to inspect the sandbox ID, template, metadata, current state, and expiration time.

Kill a sandbox

You can use the kill method to shut down a sandbox before its timeout expires when you no longer need it.

Next steps

Last modified on June 8, 2026