POST /memory/add_image
Add an image-based memory with optional text context. This endpoint is designed for screen capture and visual memory storage. The API can automatically classify the memory type based on the provided context.Request Body
Base64-encoded image data URL or remote image URL. Used for storing visual context like screenshots.
Unique identifier for the user. All memories are associated with this user ID.
Optional text context describing the image. Used for classification and search relevance. For example: “Working on authentication bug in React component”.
Optional metadata to attach to the memory. Defaults include
{"source": "screen_capture"}. You can add custom fields or manually specify memory_type.Enable automatic memory type classification based on the context. When enabled and context is provided, the API uses GPT-4.1-nano to classify the memory.
Response
Indicates whether the memory was successfully added.
Details about the created memory.
The automatically classified memory type if auto_classify was enabled. One of: LONG_TERM, SHORT_TERM, EPISODIC, SEMANTIC, or PROCEDURAL.
Example Request
Example Response
Use Cases
Screen Capture
Automatically capture and store screenshots with visual context during coding sessions or interviews.
Visual Documentation
Store images of diagrams, whiteboards, or UI mockups with searchable context.
Bug Tracking
Capture error screenshots with context for future debugging reference.
Learning Journal
Save visual examples from tutorials or documentation with annotations.
Implementation Details
The endpoint processes images using GPT-4.1-nano with vision capabilities enabled. The image is analyzed alongside any provided text context to extract meaningful facts that can be searched later. Source:backend/main.py:263-305
Related Endpoints
- Add Memory - Add text-based memories from conversations
- Search Memory - Search for stored memories including image-based ones
- Get All Memories - Retrieve all memories for a user