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

# 记忆详情

> 获取当前 API Key 所属账号的一条 Agent 记忆。



## OpenAPI

````yaml /openapi/zh/aitoearn.openapi.json get /api/agent/memories/{memoryId}
openapi: 3.0.1
info:
  title: AiToEarn 开放平台 API
  description: AiToEarn 开放平台 API，支持在中国站与国际站之间切换调试。业务是否成功以响应体 code === 0 为准。
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: 中国站
  - url: https://aitoearn.ai
    description: 国际站
security: []
tags:
  - name: AI 服务
  - name: AI 服务/视频生成
  - name: AI 服务/图像生成
  - name: 渠道管理
  - name: 渠道管理/账号
  - name: 渠道管理/内容发布
  - name: 渠道管理/平台
  - name: 渠道管理/作品
  - name: 渠道管理/账号分组
  - name: 渠道管理/授权
  - name: 资源管理
  - name: AI 服务/大语言模型
  - name: AI 服务/真人素材
  - name: AI 服务/Agent
paths:
  /api/agent/memories/{memoryId}:
    get:
      tags:
        - AI 服务/Agent
      summary: 记忆详情
      description: 获取当前 API Key 所属账号的一条 Agent 记忆。
      operationId: AgentController_getMemory
      parameters:
        - name: memoryId
          in: path
          required: true
          description: 记忆 ID。
          schema:
            type: string
            description: 记忆 ID。
      responses:
        '200':
          description: 请求已被服务处理。业务是否成功以响应体 code === 0 为准。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 记忆 ID。
                      type:
                        type: string
                        enum:
                          - semantic
                          - procedural
                          - episodic
                        description: 记忆类型。semantic 为语义记忆，procedural 为流程记忆，episodic 为情景记忆。
                      parts:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - text
                                - image
                                - video
                                - audio
                                - file
                              description: 记忆分段类型。
                            text:
                              type: string
                              description: 文本内容。仅文本分段返回。
                            url:
                              type: string
                              description: 媒体或文件 URL。仅媒体或文件分段返回。
                          required:
                            - type
                          additionalProperties: false
                        description: 转写后的记忆分段。
                      inputParts:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - text
                                - image
                                - video
                                - audio
                                - file
                              description: 记忆分段类型。
                            text:
                              type: string
                              description: 文本内容。仅文本分段返回。
                            url:
                              type: string
                              description: 媒体或文件 URL。仅媒体或文件分段返回。
                          required:
                            - type
                          additionalProperties: false
                        description: 转写前的原始记忆分段。
                      reason:
                        type: string
                        description: 写入这条记忆的理由。
                      createdAt:
                        type: string
                        format: date-time
                        description: 创建时间。
                      updatedAt:
                        type: string
                        format: date-time
                        description: 更新时间。
                    required:
                      - id
                      - type
                      - parts
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                  code:
                    type: integer
                    description: 业务状态码。0 表示成功，非 0 表示业务错误。
                  message:
                    type: string
                    description: 响应消息。
                  requestId:
                    type: string
                    description: 请求 ID。
                  timestamp:
                    type: integer
                    description: 错误响应时间戳，Unix 毫秒。
                required:
                  - code
                  - message
              examples:
                success:
                  summary: 成功
                  value:
                    code: 0
                    message: 请求成功
                    data:
                      id: string
                      type: semantic
                      parts:
                        - type: text
                          text: string
                          url: string
                      createdAt: '2026-07-02T12:00:00.000Z'
                      updatedAt: '2026-07-02T12:00:00.000Z'
                      inputParts:
                        - type: text
                          text: string
                          url: string
                      reason: string
                validationFailed10002:
                  summary: ValidationFailed (10002)
                  value:
                    code: 10002
                    message: 参数验证失败
                    data: {}
                    timestamp: 1772099056662
                unauthorized401:
                  summary: 未认证或 API Key 无效
                  value:
                    code: 401
                    message: Unauthorized
                    data: {}
                    timestamp: 1772099056662
      security:
        - apikey-header-X-Api-Key: []
components:
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: 需要从 AiToEarn 获取 API Key。点击前往[「API Key 获取教程」](/zh/use/api-key)。

````