cURL
Authorizations
string
header
required
DashScope API Key
Body
application/jsonResponse
200-application/json
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create a runtime environment
curl --request POST \
--url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/environments' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "data-sandbox",
"description": "数据分析沙箱",
"scope": "organization",
"metadata": {
"team": "infra"
},
"config": {
"type": "cloud",
"packages": {
"apt": [
"ffmpeg"
],
"pip": [
"pandas",
"numpy",
"matplotlib"
]
},
"networking": {
"type": "unrestricted"
}
}
}
'{
"id": "env_xxx",
"type": "environment",
"name": "data-sandbox",
"description": "数据分析沙箱",
"scope": "organization",
"config": {
"type": "cloud",
"packages": {
"apt": [
"ffmpeg"
],
"pip": [
"pandas",
"numpy",
"matplotlib"
]
},
"networking": {
"type": "unrestricted"
}
},
"metadata": {
"team": "infra"
},
"archived_at": null,
"created_at": "2026-06-16T12:45:34+08:00",
"updated_at": "2026-06-16T12:45:34+08:00",
"requestId": "xxx"
}DashScope API Key
工作空间内唯一标识
环境用途说明
作用域。organization:工作空间全部成员可见与复用。默认 organization
沙箱配置
业务自定义键值,不影响运行行为
环境 ID,格式 env_<base64 编码字符串>,示例值 env_N2M2OTc4NTY4ZjRkNDEwZT
固定为 environment
工作空间内唯一标识
环境用途说明
作用域。organization 表示工作空间全部成员可见与复用
业务自定义键值
归档时间,未归档时为 null
创建时间,ISO 8601
最近更新时间,ISO 8601
本次请求的唯一标识
curl --request POST \
--url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/environments' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "data-sandbox",
"description": "数据分析沙箱",
"scope": "organization",
"metadata": {
"team": "infra"
},
"config": {
"type": "cloud",
"packages": {
"apt": [
"ffmpeg"
],
"pip": [
"pandas",
"numpy",
"matplotlib"
]
},
"networking": {
"type": "unrestricted"
}
}
}
'{
"id": "env_xxx",
"type": "environment",
"name": "data-sandbox",
"description": "数据分析沙箱",
"scope": "organization",
"config": {
"type": "cloud",
"packages": {
"apt": [
"ffmpeg"
],
"pip": [
"pandas",
"numpy",
"matplotlib"
]
},
"networking": {
"type": "unrestricted"
}
},
"metadata": {
"team": "infra"
},
"archived_at": null,
"created_at": "2026-06-16T12:45:34+08:00",
"updated_at": "2026-06-16T12:45:34+08:00",
"requestId": "xxx"
}