cURL
Authorizations
string
header
required
DashScope API Key
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
启动一个新会话
curl --request POST \
--url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/sessions' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "agent_xxx",
"environment_id": "env_xxx",
"title": "Q3 销售数据分析",
"resources": [
{
"type": "file",
"file_id": "file_xxx",
"mount_path": "/workspace/data.csv"
}
]
}
'{
"id": "sesn_01JXH5K2M3N4",
"type": "session",
"status": "active",
"agent": "agent_xxx",
"environment_id": "env_xxx",
"title": "Q3 销售数据分析",
"resources": [
{
"type": "file",
"file_id": "file_xxx",
"mount_path": "/workspace/data.csv"
}
],
"vault_id": null,
"metadata": {},
"created_at": "2026-07-20T10:00:00Z",
"updated_at": "2026-07-20T10:00:00Z",
"workspace_id": "ws_xxx",
"request_id": "req_xxx"
}DashScope API Key
curl --request POST \
--url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/sessions' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "agent_xxx",
"environment_id": "env_xxx",
"title": "Q3 销售数据分析",
"resources": [
{
"type": "file",
"file_id": "file_xxx",
"mount_path": "/workspace/data.csv"
}
]
}
'{
"id": "sesn_01JXH5K2M3N4",
"type": "session",
"status": "active",
"agent": "agent_xxx",
"environment_id": "env_xxx",
"title": "Q3 销售数据分析",
"resources": [
{
"type": "file",
"file_id": "file_xxx",
"mount_path": "/workspace/data.csv"
}
],
"vault_id": null,
"metadata": {},
"created_at": "2026-07-20T10:00:00Z",
"updated_at": "2026-07-20T10:00:00Z",
"workspace_id": "ws_xxx",
"request_id": "req_xxx"
}