> ## 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/search

> 通过 POST /v1/workspaces/:workspace_id/cubes/:cube_id/search 在立方体内语义检索记忆节点。最小角色 viewer。

在记忆立方体内做向量语义检索，返回与查询最相关的节点。

## 接口

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

## 认证

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

## 路径参数

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

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

## 请求体

<ParamField body="query" type="string">
  检索文本（用于生成查询向量）。
</ParamField>

<ParamField body="k" type="integer">
  返回的最相似节点数量。
</ParamField>

## 响应

响应为一个数组，每个元素为记忆节点（字段同[列出节点](/api-reference/memo/nodes/list)）。

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://memo.ariacompute.cn/v1/workspaces/ws_01a2b3c4d5e6/cubes/cube_01a2b3c4d5e6/search \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{"query":"用户的语言偏好","k":5}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "node_01a2b3c4d5e6",
      "cube_id": "cube_01a2b3c4d5e6",
      "type": "text",
      "content": "用户偏好中文回复。",
      "tier": 4,
      "meta": "{}",
      "auto": false,
      "source_type": "session",
      "source_id": "sess_01a2b3c4d5e6",
      "created_at": "2026-10-12T08:25:00Z"
    }
  ]
  ```
</ResponseExample>


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