Skip to main content

Create Sandbox

The simplest way to create a sandbox is to call novita.sandbox.create() without any arguments.

From Template

You can create a sandbox from a template by passing the template name or ID.
Python
Use a context manager for automatic cleanup:

Environment Variables

You can set environment variables when creating a sandbox, and override or append them on a single command.

Metadata

Sandbox metadata lets you attach custom key-value information to a sandbox. Common uses include:
  • Connecting a sandbox to a user session.
  • Saving custom user-related data for a sandbox, such as API keys.
  • Linking a sandbox to a user ID so it can be reconnected later.
Metadata is provided when the sandbox is created. Later, it can be read when listing active sandboxes with novita.sandbox.list(). Sandboxes can also be filtered using metadata when listing.
Last modified on August 6, 2026