List templates

Updated at:

List the sandbox templates in the current workspace, with cursor-based pagination.

Prerequisites

Configure the endpoint and authentication first. See API overview and authentication.

Endpoint

GET/v2/templates

List the templates in the current workspace. The route GET /templates is also supported.

Query parameters

limitintegerOptional

Number of items per page. Default: 100. Maximum: 100.

cursorstringOptional

Pagination position marker.

Response fields

Each array element contains the following fields.

templateIDstring

Template ID.

templateNamestring

Template name.

cpuCountinteger

Number of vCPUs.

memoryMBinteger

Memory size in MB.

publicboolean

Whether the template is public.

aliasesarray<string>

Alias list.

namesarray<string>

Template name list.

createdAtstring

Creation time in date-time format.

updatedAtstring

Update time in date-time format.

spawnCountinteger

Number of instances of the template.

buildCountinteger

Number of template versions.

envdVersionstring

envd version.

Request example

curl -X GET "$BASE_URL/v2/templates?limit=100" \
  -H "Authorization: Bearer $BAILIAN_API_KEY"

BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/agentstudio/sandbox, and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.

Response example

The response body is an array of templates rather than a paginated object.

[
  {
    "templateID": "your-template-id",
    "templateName": "my-template",
    "cpuCount": 1,
    "memoryMB": 2048,
    "public": false,
    "aliases": [],
    "names": ["my-template"],
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedAt": "2026-01-01T00:00:00Z",
    "spawnCount": 2,
    "buildCount": 1,
    "envdVersion": "your-envd-version"
  }
]