**版本：202601**

# 查询 AI 卡片详情

**GET** `/openapi/2026-01/themes/edit-sessions/:oseid/gen-blocks`

返回 AI 卡片在当前会话中的文件信息和使用情况（是否已保存、被引用的次数等）；传 `with_content=true` 时附带卡片源码。

## 请求

**Path参数**

- `oseid` string (required)

  编辑会话 ID

**Query参数**

- `type` string

  卡片的 `card_type`（`blocks/` + 文件名去扩展名），如 `blocks/gen_1a0d523`
- `with_content` boolean

  为真时响应额外返回卡片源码 `doc.content`

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `doc` object

    文件本身的属性

    - `id` string

      这份文件在库里的 doc id（uuid）
    - `type` string

      文件目录，固定 `blocks`；`card_type` 由 `type` 与 `location`（去扩展名）拼接得到
    - `location` string

      文件名，如 `gen_1a0d523.liquid`
    - `hash` string

      当前内容（编辑态视图口径）的 MD5
    - `content` string

      卡片源码；仅 `with_content=true` 时返回
    - `created_at` string

      创建时间
    - `updated_at` string

      更新时间：当前这份内容最后被修改的时间
  - `saved` boolean

    卡片是否已进入草稿环境（按 location 判在、不比对内容）
  - `ref_count` int32

    主题内的实例引用数
  - `instances` object

    引用明细，按容器键控：`{ <容器 location（去后缀）>: [路径…] }`。路径与编排接口 target 同一语法，一定落在某个 blocks 数组的下标上，如 `1787800762db788e94.blocks.0`、`sections.1787800762db788e94.blocks.0`

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "doc": {
      "id": "string",
      "type": "string",
      "location": "string",
      "hash": "string",
      "content": "string",
      "created_at": "string",
      "updated_at": "string"
    },
    "saved": true,
    "ref_count": 0,
    "instances": {}
  }
}
```
