> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novita.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# V2 migration guide

When updating older template examples to the current SDK shape, use the Novita client as the main entry point and follow the current template build flow:

* Start a template builder with `novita.template.new()`.
* Build the template with `novita.template.build(...)` before creating a sandbox.
* Pass the returned template ID into `novita.sandbox.create(...)`.
* Move startup logic into `setStartCmd(...)` / `set_start_cmd(...)` so the environment is ready before runtime requests arrive.
* Move repeated package installation and file-copy steps into the template build instead of running them after sandbox launch.
* Use tags for release promotion instead of changing template names for every rollout.

For JavaScript and TypeScript, use the standard ESM import path when working with the template API in a Node ESM project:

```js JavaScript & TypeScript icon="js" theme={"system"}
import { Novita } from 'novita-sandbox'

const novita = new Novita()
const template = novita.template.new().fromPythonImage('3.12')
const build = await novita.template.build(template, 'my-python-app')
const sandbox = await novita.sandbox.create(build.templateId)
```

For Python, the same flow uses snake\_case methods:

```python Python icon="python" theme={"system"}
from novita_sandbox import Novita

novita = Novita()
template = novita.template.new().from_python_image("3.12")
build = novita.template.build(template, "my-python-app")
sandbox = novita.sandbox.create(build.template_id)
```

This is the currently validated path for the template API in this documentation set.
