# Templates (/docs/api/templates)



Templates are stable environment families selected by slug. Discovery lets an
agent choose from environments CrowNest has deployed and smoke tested instead
of scraping examples or guessing a provider image.

Both endpoints require `sandbox:read`. The catalogue is read-only; CrowNest
does not expose Template mutation or custom-image APIs.

## List Templates [#list-templates]

`GET /v1/templates` returns `{ "data": [...] }`.

```bash
curl https://api.crownest.dev/v1/templates \
  -H "Authorization: Bearer $CROWNEST_API_KEY"
```

Use `crownest templates list`, `client.templates.list()`, or the MCP
`list_templates` tool for the same catalogue.

## Get a Template [#get-a-template]

`GET /v1/templates/{templateSlug}` returns one Template. Use the returned
`slug` as the `template` input when creating a Sandbox or Workspace Run.

```bash
crownest templates get node
```

## Curated catalogue [#curated-catalogue]

| Slug          | Environment              | Languages                      | Package managers           | Workspace Runs |
| ------------- | ------------------------ | ------------------------------ | -------------------------- | -------------- |
| `python-node` | Python 3 with Node.js 22 | Python, JavaScript, TypeScript | `uv`, `pip`, `pnpm`, `npm` | Yes            |
| `node`        | Node.js 22               | JavaScript, TypeScript         | `npm`                      | Yes            |

Both Templates support explicit Artifact collection. `python-node` remains the
default and broad repository runner. `node` is the lean choice for JavaScript
and TypeScript repositories. Version IDs are immutable; slug-only creation
resolves the current deployed default version. Public responses never expose
Cloudflare bindings, image references, container classes, or provider IDs.
