All Products
Search
Document Center

Platform For AI:Manage instant services and templates

Last Updated:Aug 28, 2026

An instant service is the billing and permission unit in PAI-Instant Service. A template defines the runtime environment for instances. This topic describes how to create and manage instant services (including workbench access) and how to create and manage templates (from an image, from an instance, or from a public template).

Overview

PAI-Instant Service uses a three-tier resource structure: Instant Service → Template → Instance. This topic covers the management of the first two tiers. The overall workflow is as follows:

  1. Administrator creates an instant service: Create an instant service, select the network egress mode, resource type, and (optional) image repository.

  2. Administrator or developer creates a template: Define a runtime environment within the instant service — from an image, from an instance, or from a public template.

  3. End users use instances: Launch instances from templates. For details, see Manage Instant Service instances.

Note

For the full three-tier resource model, see Instant Service overview — Resource hierarchy.

Create an instant service

  1. Log in to the PAI console.

  2. In the left-side navigation pane, select Elastic Algorithm Service (EAS) to go to the service list page.

  3. Switch to the Instant Service tab at the top.

  4. Click Create Instant Service to go to the creation page.

  5. Configure the following parameters:

    Parameter

    Description

    Name

    Required. Supports lowercase letters, digits, and underscores. Must start with a lowercase letter. Maximum 36 characters.

    Resource Type

    Required. Select the resource group ID for Instant Service in EAS Resource Group.

    Enterprise Edition Image Instance

    Optional. Required only if you need to create templates from custom images.

    • Select a Standard or Premium ACR Enterprise Edition instance under your account. Templates pull images from this repository. If you have not created an ACR repository yet, click the link on the page to go to the ACR console and create one.

    • If you only use public templates, leave this field blank.

    Custom Authentication

    Optional. When enabled, you can set a custom token for service API authentication. When disabled, the system generates a default token automatically.

    Network Egress Mode

    Required. Default is Shared Public Network.

    • Dedicated VPC: Connects the service to your VPC for internet access via your configured NAT gateway. Suitable for accessing corporate intranet resources and using custom security groups and network policies.

    • Isolated Mode: Instant services cannot access any external networks, making them suitable for tasks such as sensitive data processing and compliance isolation.

    • Shared Public Network: Instant services access the internet through the platform's public gateway, allowing you to quickly set up a test environment without configuring a VPC. This mode uses shared bandwidth among multiple users, provides no SLA or bandwidth stability guarantees, and charges no public traffic fees.

  6. Click Confirm to complete the creation.

Access the instant service workbench

After the creation is complete, you can view existing instances in the list on the Instant Service tab.

In the Invoke column, click the Instant Service Workbench icon. The Go to Instant Service Workbench dialog box appears, providing two types of access links:

Link type

Purpose

Permission scope

Manage Links

For full management of the instant service, templates, and instances

Create, view, and delete templates and instances

Read-only Link

For viewing the configuration and monitoring information of the instant service, templates, and instances

View only — create and delete are not available

Important

Both Manage Links and Read-only Link are accessible over the public network. Links are valid for 12 hours. Generate a new link after they expire. Store these links securely and do not share them with unauthorized users.

Copy the Manage Links or Read-only Link URL and open it in a browser to access the instant service workbench.

Workbench actions

The instant service workbench provides four core actions:

  • Create template: Create a new template in the current instant service.

  • Create instance: Launch an instance from an existing template.

  • Open monitoring: Go to the Grafana dashboard to view instant service metrics at the service level.

  • Share: Generate and copy a workbench access link to share with team members.

Workbench information

The instant service workbench shows the following details:

  • Instant service info: Number of templates, total instances, and running instances.

  • Network configuration: VPC ID, vSwitch ID, and security group ID.

  • Account information: RAM user ID and Alibaba Cloud account ID.

  • Image information: Image repository address.

The instant service workbench also provides the following views:

  • Private templates: All user-created templates in the current instant service.

  • Public templates: Platform-provided public templates. For details, see Use public templates.

  • Instance list: All running or paused instances in the current instant service.

Create a template

A template defines the runtime environment for instances, including the image, startup command, and resource specifications. An instant service can have multiple templates for different runtime environments.

Note

An Enterprise Edition Image Instance (Standard or Premium edition) must be configured when creating the instant service to create templates.

Steps

  1. In the upper-right corner of the instant service workbench, click Create template.

  2. In the Create new template panel that slides out on the right, configure the following parameters:

    Parameter

    Required

    Description

    Template name

    Yes

    The system generates a default name. You can customize it.

    Template description

    No

    A description of the template's purpose. Maximum 100 bytes.

    Custom token

    No

    If left blank, the system generates a token automatically for instance authentication.

    Creation method

    Yes

    Supports From image, From instance, and From public template. For details, see Three creation methods below.

  3. Click Create template. The template enters the building state. When the build completes, the status changes to Ready.

Three creation methods

From image

Create a template from a container image. Use this method when you have a standardized runtime image. Configure the following:

  • Image address: Required. Enter the full image address from your ACR repository.

  • Startup command: The entry command that runs when an instance starts.

  • Readiness command: The health-check command that runs after the instance starts.

    Example: If your service runs on port 8000, verify that the service is fully ready before creating the template. Set the readiness command to curl -f http://localhost:8000 to verify the HTTP status code.
  • Resource configuration: CPU cores, memory (MiB), disk (GiB), and timeout (seconds). Default: 2 cores / 2,000 MiB / 30 GiB / 3,600 seconds.

  • Environment variables: Key-value pairs visible inside the instance.

From instance

Save the complete state of an instance as a new template, including written files, installed dependencies, and running processes. Enter the Instance ID. For details, see Manage instances — Save as template.

From public template

Save a public template to your enterprise ACR instance to improve image pull performance and reliability. Select the public template you want to save.

View template details

On the Private templates or Public templates tab in the workbench, click a template ID to open its details page.

Actions

  • View SDK connection info: Click SDK Access to view the connection configuration and Python code samples for calling via the E2B SDK. Copy the configuration with one click.

  • Open monitoring: Go to the Grafana dashboard at the template level.

  • Share: Generate and copy an access link for this template.

  • Create instance: Launch a new instance from this template.

Template details

The template details page includes:

  • Basic information: Template ID, ENVD version, API token, creation time, last update time, RAM user ID, and Alibaba Cloud account ID.

  • Resource specifications: CPU, memory, and disk.

  • Environment variables: Key-value pair list.

  • Repository address: The ACR image repository associated with this template.

  • Build information: Build type (for example, from image), source image, startup command, and readiness command.

  • Instance list: All instances created from this template.

What's next