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

# 多模态写入

> 写入和检索文本、图像、音频、视频和 JSON 内容。

# 多模态写入（Multimodal Ingest）

Memorose 可以写入和检索纯文本以外的多种内容类型。

## 支持的写入内容类型

当前写入接口支持以下类型：

* `text`
* `image`
* `audio`
* `video`
* `json`

请求体使用 `content` 加 `content_type` 字段。

## 示例：JSON 事件

```bash theme={null}
curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/streams/$STREAM_ID/events" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "org_id": "default",
    "content_type": "json",
    "content": "{\"source\":\"calendar\",\"title\":\"Team sync\",\"time\":\"2026-03-25T09:00:00Z\"}"
  }'
```

## 多模态检索（Multimodal Retrieval）

检索时可以将文本查询与 base64 编码的媒体一起进行向量嵌入：

* `image`
* `audio`
* `video`

```bash theme={null}
curl -s -X POST "http://127.0.0.1:3000/v1/users/user_123/streams/$STREAM_ID/retrieve" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Find related UI references for this screenshot",
    "image": "<base64-image>",
    "limit": 5
  }'
```

查询文本仍然是必需的。媒体内容作为额外的检索信号。
