PAI-Instant Service is the AI execution-layer infrastructure provided by Alibaba Cloud Platform for AI (PAI). Built on hardware-virtualized lightweight MicroVM technology, it provides a runtime environment with security isolation, on-demand creation, and programmable interaction. It runs tasks such as code execution, file operations, and browser automation, and returns structured results to upstream applications.
What is PAI-Instant Service
Operations such as executing code, reading and writing files, and controlling browsers are inherently untrusted instructions. They can compromise the host system, leak data, or cause resource exhaustion due to model hallucinations or prompt injection. Traditional containers share the host kernel, which widens the attack surface and cannot meet application requirements for state persistence, millisecond-level start and stop, and fine-grained lifecycle management.
PAI-Instant Service uses lightweight MicroVM hardware-level virtualization to build a strictly isolated execution environment with three layers of defense: file system isolation, network egress control, and resource usage limits.
Key features
MicroVM hardware-level security isolation: Each instance runs on a lightweight virtual machine with its own guest OS kernel. Isolation is equivalent to a traditional virtual machine, which eliminates the escape risk caused by a shared container kernel. Instances keep this VM-level security boundary and still deliver millisecond-level cold starts and high resource utilization, so you get both security and performance.
Enterprise-grade visual workbench: A full-featured visual management console supports three-tier resource management (instant service, template, and instance), Web Terminal, VNC graphical desktop, online file management, HTTP endpoint debugging, and request log auditing. You do not need to build your own operations tools. Developers run the end-to-end workflow, from creation to debugging, in the console.
E2B SDK compatibility for zero-cost migration: PAI-Instant Service natively supports the E2B open-source SDK interface specification. Migrate existing applications by updating two environment variables:
E2B_DOMAINandE2B_API_KEY. No business code changes are needed. Official templates for mainstream scenarios such as Code Interpreter, Browser Use, and Desktop GUI are available out of the box.
Application scenarios
Instant Service applies to scenarios such as RL training and evaluation, characterized by massive concurrency (hundreds to thousands of instances running simultaneously), short lifecycles, and rapid environment forking.
Large-scale parallel training: Batch-create instances from templates. Each instance independently runs a training episode and collects experience data. Instances are destroyed after completion.
Model evaluation and benchmarking: Create an isolated instance for each model version to run standardized evaluation tasks, ensuring fair and reproducible results.
Resource hierarchy
PAI-Instant Service uses a three-tier resource structure: Instant Service → Template → Instance. This structure separates heavyweight operations, such as service creation and billing association, from lightweight operations, such as service usage. After an administrator completes the one-time service setup, end users only need a token to use instances on demand.
Tier | Description |
Instant Service | The billing and permission unit. Resource usage and costs for all templates and instances under an instant service are aggregated to that service. Each instant service has its own network configuration (VPC, vSwitch, and security group) and access credentials. |
Template | A template defines an instant service runtime environment. An instant service can contain multiple templates for different runtime environments, such as a Python data analytics environment or a Browser Use environment. EAS supports three ways to create a template: from an image, from a saved instance, or from a public template. |
Instance | A running instance launched from a template, with an independent lifecycle. Each instance has its own instance ID, access token, file system, access URL, and service ports. |
Supported regions
Currently available regions: China East 2 (Shanghai), China North 6 (Ulanqab), and China Northwest 2 (Zhongwei).
Billing
Billing overview
When you use PAI-Instant Service, you pay for the compute resources (CPU and memory) and system disk used by your instances.
Billing is aggregated at the instant service level: costs from all templates and instances under a service are recorded under that service, making it straightforward to track spending by business unit or project.
PAI-Instant Service supports the following resource type:
Resource type | Billing model | Description |
Dedicated resource group | Pay-as-you-go / Subscription | You pre-purchase "Instant Service Compute Resources" on the PAI general computing purchase page. These dedicated resources are exclusively reserved for your use. The dedicated resource group supports high-performance CPU specifications designed for instant service. |
All prices in this topic are for reference only. Actual prices are subject to the Alibaba Cloud purchase page and your billing statement.
Billing period
Resource type | Billing starts | Billing ends |
Dedicated resource group (pay-as-you-go) | When the dedicated resource group machine is created and enters the Running state (billing continues even if no instances are created). | When the dedicated resource group machine is deleted. |
Dedicated resource group (subscription) | 00:00:00 on the day after the purchase. | The subscription expiration time. |
Monitor when billing starts and stops. Destroy unused instances promptly to avoid unnecessary charges.
Billing by state
Instance billing depends on the instance lifecycle state:
State | Compute resources (CPU/memory) | System disk | Description |
Running | Billed | Billed | Billed based on the instance specification multiplied by the actual runtime. |
Paused | Billed at the same rate as Running | Billed | Instance state is preserved for resumption or template creation. Resources remain allocated, so billing continues at the same rate. |
Destroyed | Not billed | Not billed | Resources are released and billing stops. |
Paused instances are billed at the same rate as running instances. Pausing preserves the instance state for resumption or template creation. To reduce costs, destroy instances that are no longer needed.
Unit prices
Billing item | Billing method | Formula | Unit price |
Dedicated resource group | Pay-as-you-go | Bill amount = Number of machines × (Machine hourly rate + System disk capacity × System disk hourly rate) × Duration (minutes) / 60 | For pricing details, go to the EAS Dedicated Machine Pay-As-You-Go purchase page and Block storage (ESSD PL1 cloud disk) pricing page. |
Subscription | Bill amount = Number of machines × (Machine monthly rate + System disk capacity × System disk monthly rate) × Subscription duration (months) | For pricing details, go to the EAS Dedicated Machine Subscription purchase page and Block storage (ESSD PL1 cloud disk) pricing page. |
Pay-as-you-go billing is calculated at a per-minute granularity.
Overdue payments and service suspension
If your Alibaba Cloud account has an overdue payment, PAI-Instant Service enters a service suspension process:
When payment becomes overdue: You cannot create new instances or templates. All instances are destroyed, but custom templates are retained.
Monitor your account balance to avoid data loss.
What's next
Build your first instance and complete validation: Quick start
Create an instant service and template: Manage instant service and templates
Create and use instances: Manage instances