Templates

Templates are used to create workloads in your workspace, you can create a template for dedicated endpoint, dev pods and batch jobs, so that you can improve your productivity by reusing the same configuration.

Create a Template

The process of creating a template is much similar to creating a workload like what we did in dedicated endpoint, dev pods and batch jobs. You can specify the configuration of the template, and use placeholders to make the template more flexible.

Navigate to the Create Templates page on your workspace, where you can see a detailed form to create a template.

Creation Form

For a template, you need to specify a workload type, which can be one of the following:

  • Custom Model Endpoints: Build a custom model endpoint with full control over parameters, dependencies and runtime environments.
  • Container Image Endpoints: Deploy models from container images.
  • Dev Pods: Interactive coding with ssh, jupyter or your favorite tool.
  • Batch Jobs: Run training, data processing and other batch jobs.

Configuration

Now you can follow the page instructions to fill in the configuration for you template based on the selected workload type.

Custom Model Endpoints

The configuration options for custom model endpoints are similar to the ones for create dedicated endpoints from custom models, with the addition of some official Lepton Photons for you to get started.

Container Image Endpoints

The configuration for container image endpoints is the same as create dedicated endpoints from container images, you can check the guide for more details.

Dev Pods

The configuration for dev pods is the same as create a dev pod, you can check the guide for more details.

Batch Jobs

The configuration for batch jobs is the same as create a batch job, you can check the guide for more details.

Placeholders

placeholders

There are some placeholders for you to use in the configuration, which can make your template more flexible. You can use placeholders in the following fields:

  • {{user.email}}: Email address of the workload creator.
  • {{user.email_username}}: Username part of the workload creator's email (before @).
  • {% raw %} raw-content {% endraw %}: Content that skips template parsing.

Example for placeholders

Take Dev Pod template as an example, you can use the placeholder {{user.email_username}} in the Job Name, Pod Name or Endpoint Name field to make the workload name unique for each creator. Take a dev pod template as an example, simply set Pod Name to {{user.email_username}}-dev-pod, and the workload name will be hey-dev-pod for user with hey@lepton.ai email.

Use a Template

Assume that we have created a template for dev pods, you can use the template to create a dev pod by following the steps below:

  • Head to the Create Dev Pod page.
  • Click on the Templates dropdown on the top right corner and select the target template.
    Templates Dropdown
  • The form will be filled with the template configuration automatically, and you can modify the fields if needed.
Lepton AI

© 2025