Skip to main content
Template Management

Create Template

Create a sandbox template

POST
/api/v1/agentstudio/sandbox/v3/templates
cURL
curl --request POST \
  --url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/sandbox/v3/templates' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "cpuCount": 0,
  "memoryMB": 0,
  "fromImage": "<string>",
  "imageName": "<string>",
  "tags": [
    "<string>"
  ],
  "alias": "<string>",
  "mntConfig": [
    {
      "originFileName": "<string>",
      "originFileId": "<string>",
      "mountPath": "<string>"
    }
  ],
  "networkConfig": {
    "allowOut": [
      "<string>"
    ],
    "denyOut": [
      "<string>"
    ]
  },
  "envConfig": {},
  "autoPauseTime": 0,
  "maxRunningTimeout": 0,
  "description": "<string>"
}
'
{
  "templateID": "<string>",
  "templateName": "<string>",
  "templateType": "<string>",
  "cpuCount": 0,
  "memoryMB": 0,
  "public": false,
  "regionId": "<string>",
  "imageName": "<string>",
  "buildID": "<string>",
  "buildStatus": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "version": 0,
  "tags": [
    "<string>"
  ],
  "aliases": [
    "<string>"
  ]
}

Authorizations

string
header
required

Body

application/json
string
required

模版名称

integer
required

vCPU 数量,必须大于 0,且与内存匹配平台支持的规格组合

x >= 1
integer
required

内存大小,单位 MB,必须大于 0,且与 CPU 匹配平台支持的规格组合

x >= 1
string

基础镜像,缺省时使用平台默认镜像

string

镜像展示名称

string[]

E2B 标签

string

E2B 模版别名

object[]

文件挂载配置

object

网络规则

object

写入模版运行环境的环境变量键值对

integer

到期自动暂停时间,单位秒,取值范围 [300,604800]

300 <= x <= 604800
integer

最大运行时间,单位秒,取值范围 [300,604800]。到期自动释放。仅传 autoPauseTime 时到期自动暂停;两者都传时 maxRunningTimeout 优先生效;两者都不传时默认最大运行时间为 604800 秒

300 <= x <= 604800
string

模版描述

Response

202-application/json
string

模版 ID

string

模版名称

string

模版类型,例如 CUSTOM

integer

vCPU 数量

integer

内存大小,单位 MB

boolean

是否公开

string

地域

string

镜像展示名称

string

构建 ID,用于查询构建状态

string

构建状态,例如 building

string

创建时间

string

更新时间

integer

模版版本号

string[]

标签。在能够被后续列举/获取模版稳定返回前,不作为持久化字段

string[]

别名列表。在能够被后续列举/获取模版稳定返回前,不作为持久化字段

Overview
Managed Agent API
Memory API
Flow Agent API
RAG API
Connector API
Framework Integration
Assistant API (Deprecating)
  • Overview