Environment
创建 Environment
创建运行环境
cURL
Copy
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": "Python 数据分析",
"config": {
"type": "cloud",
"packages": {
"pip": [
"pandas",
"matplotlib"
]
},
"networking": {
"type": "unrestricted"
}
}
}
'Copy
{
"id": "env_01JXH5K2M3N4",
"type": "environment",
"name": "Python 数据分析",
"description": "预装 pandas 和 matplotlib",
"config": {
"type": "cloud",
"packages": {
"pip": [
"pandas",
"matplotlib"
]
},
"networking": {
"type": "unrestricted"
}
},
"metadata": {},
"created_at": "2026-07-20T10:00:00Z",
"updated_at": "2026-07-20T10:00:00Z",
"workspace_id": "ws_xxx",
"request_id": "req_xxx"
}