> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 新增记忆节点 - POST /v1/workspaces/:workspace_id/cubes/:cube_id/nodes

> 通过 POST /v1/workspaces/:workspace_id/cubes/:cube_id/nodes 向立方体内写入一条记忆节点。最小角色 contributor。

向某个记忆立方体内新增一条记忆节点。节点会被向量化以便后续语义检索与连边。

## 接口

```http theme={null}
POST /v1/workspaces/:workspace_id/cubes/:cube_id/nodes
```

## 认证

`Authorization: Bearer <jwt>` 或 `X-API-Key <sk_...>`。最小角色：**contributor**。

## 路径参数

<ParamField path="workspace_id" type="string" required>
  工作空间 id。
</ParamField>

<ParamField path="cube_id" type="string" required>
  立方体 id。
</ParamField>

## 请求体

<ParamField body="type" type="string">
  节点类型（`text` / `tool_trace` / `persona` / `skill`），省略时由服务端取默认。
</ParamField>

<ParamField body="content" type="string" required>
  节点内容文本。
</ParamField>

<ParamField body="tier" type="integer">
  层级（1–4）。
</ParamField>

<ParamField body="source_type" type="string">
  来源类型（`document` / `chunk` / `session` / `wiki`）。
</ParamField>

<ParamField body="source_id" type="string">
  来源对象 id。
</ParamField>

## 响应

<ResponseField name="id" type="string">
  新建节点 id（`node_...`）。
</ResponseField>

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://memo.ariacompute.cn/v1/workspaces/ws_01a2b3c4d5e6/cubes/cube_01a2b3c4d5e6/nodes \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{"type":"text","content":"用户偏好中文回复。","tier":4,"source_type":"session","source_id":"sess_01a2b3c4d5e6"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "node_01a2b3c4d5e6"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.