Skip to main content
Environment

创建 Environment

创建运行环境

POST
/api/v1/agentstudio/environments
cURL
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"
    }
  }
}
'
{
  "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"
}

Authorizations

string
header
required

DashScope API Key

Body

application/json
string
required

环境名称

string

环境用途描述

object

沙箱配置

object

业务自定义键值

Response

200-application/json
string

环境 ID

string

固定值 environment

string
string
object
object
string
string
string
string
RAG API
Connector API
Memory API
框架集成
  • 框架