> ## 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/convert/from-kb

> 通过 POST /v1/workspaces/:workspace_id/cubes/:cube_id/convert/from-kb 把若干知识条目手动写入记忆立方。最小角色 contributor。

手动把若干知识条目转换为记忆节点，写入指定记忆立方。与文档解析后的自动转换相对，这里由调用者显式提供内容。

## 接口

```http theme={null}
POST /v1/workspaces/:workspace_id/cubes/:cube_id/convert/from-kb
```

## 认证

`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">
  生成的记忆节点类型。
</ParamField>

<ParamField body="items" type="array" required>
  知识条目数组，每项：

  <Expandable title="items[]">
    <ParamField body="content" type="string" required>
      条目内容文本。
    </ParamField>

    <ParamField body="source_type" type="string">
      来源类型。
    </ParamField>

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

## 响应

<ResponseField name="ids" type="string[]">
  新建的记忆节点 id 列表。
</ResponseField>

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://memo.ariacompute.cn/v1/workspaces/ws_01a2b3c4d5e6/cubes/cube_01a2b3c4d5e6/convert/from-kb \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{"type":"text","items":[{"content":"AriaMem 支持双向转换","source_type":"manual","source_id":""}]}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "ids": ["node_01a2b3c4d5e6"]
  }
  ```
</ResponseExample>


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