{"openapi":"3.1.0","info":{"title":"RememberOS API","description":"The organizational memory operating system for the AI era. Store text and files, hybrid-search (vector + full-text), evolve memories (graph extraction, supersession, expiry), and govern per-collection access. Sovereign, European, self-hostable — bring your own model, memory, agents, and infrastructure. All endpoints take `Authorization: Bearer mv_…` unless marked public. See the docs at https://rememberos.ai/docs/.","contact":{"name":"11data","url":"https://rememberos.ai/","email":"hello@rememberos.ai"},"license":{"name":"Proprietary — © 11data"},"version":"0.1.0"},"servers":[{"url":"https://rememberos.ai","description":"Production"}],"paths":{"/v1/memory/health":{"get":{"summary":"Health","operationId":"health_v1_memory_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/memory/collections":{"get":{"tags":["collections"],"summary":"List Collections","operationId":"list_collections_v1_memory_collections_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionResponse"},"title":"Response List Collections V1 Memory Collections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["collections"],"summary":"Create Collection","operationId":"create_collection_v1_memory_collections_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{name}":{"get":{"tags":["collections"],"summary":"Get Collection","operationId":"get_collection_v1_memory_collections__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["collections"],"summary":"Update Collection","operationId":"update_collection_v1_memory_collections__name__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Delete Collection","operationId":"delete_collection_v1_memory_collections__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{name}/grants":{"put":{"tags":["collections"],"summary":"Upsert Grant","description":"Grant an agent read/write on a collection. The first grant makes the collection\nRESTRICTED (only granted agents may access it); with no grants it is open to all the\ntenant's agents.","operationId":"upsert_grant_v1_memory_collections__name__grants_put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collections"],"summary":"List Grants","description":"List a collection's grants (agent id + label + permissions). Empty = open to all.","operationId":"list_grants_v1_memory_collections__name__grants_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{name}/grants/{agent_key_id}":{"delete":{"tags":["collections"],"summary":"Delete Grant","description":"Remove an agent's grant. When the last grant is removed the collection becomes open again.","operationId":"delete_grant_v1_memory_collections__name__grants__agent_key_id__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"agent_key_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories":{"post":{"tags":["memories"],"summary":"Store Memory","operationId":"store_memory_v1_memory_collections__collection_name__memories_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["memories"],"summary":"List Memories","description":"List a collection's memories, newest first (for the vault console).\nSoft-archived memories are hidden unless ?include_archived=true.","operationId":"list_memories_v1_memory_collections__collection_name__memories_get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemoryResponse"},"title":"Response List Memories V1 Memory Collections  Collection Name  Memories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/upload":{"post":{"tags":["memories"],"summary":"Store Memory With Images","description":"Store a memory with optional image attachments via multipart form.","operationId":"store_memory_with_images_v1_memory_collections__collection_name__memories_upload_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_store_memory_with_images_v1_memory_collections__collection_name__memories_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/folder":{"post":{"tags":["memories"],"summary":"Store Folder","description":"Upload multiple files, each becoming a separate memory with the file attached.","operationId":"store_folder_v1_memory_collections__collection_name__memories_folder_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_store_folder_v1_memory_collections__collection_name__memories_folder_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/{memory_id}/images":{"post":{"tags":["memories"],"summary":"Upload Memory Image","description":"Upload a file to an existing memory.","operationId":"upload_memory_image_v1_memory_collections__collection_name__memories__memory_id__images_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_memory_image_v1_memory_collections__collection_name__memories__memory_id__images_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/{memory_id}/images/{image_index}":{"delete":{"tags":["memories"],"summary":"Delete Memory Image","description":"Remove a specific image from a memory by index.","operationId":"delete_memory_image_v1_memory_collections__collection_name__memories__memory_id__images__image_index__delete","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"image_index","in":"path","required":true,"schema":{"type":"integer","title":"Image Index"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/{memory_id}":{"get":{"tags":["memories"],"summary":"Get Memory","operationId":"get_memory_v1_memory_collections__collection_name__memories__memory_id__get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["memories"],"summary":"Update Memory","description":"Partial update of a memory — only the provided fields change. Updating `text`\nre-embeds it (so search stays consistent). Tenant-scoped; 404 if not found.","operationId":"update_memory_v1_memory_collections__collection_name__memories__memory_id__patch","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["memories"],"summary":"Delete Memory","operationId":"delete_memory_v1_memory_collections__collection_name__memories__memory_id__delete","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/{memory_id}/related":{"get":{"tags":["memories"],"summary":"Related Memories","description":"Semantically related memories in this collection — nearest neighbours of the given\nmemory by its own embedding, excluding itself, archived, and superseded rows.","operationId":"related_memories_v1_memory_collections__collection_name__memories__memory_id__related_get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":5,"title":"Limit"}},{"name":"min_score","in":"query","required":false,"schema":{"type":"number","default":0.0,"title":"Min Score"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/profile":{"get":{"tags":["memories"],"summary":"Collection Profile","description":"Graph memory (PRD-24/4): an auto-built profile summary from the collection's\ncurrent (latest, non-expired) facts and preferences.","operationId":"collection_profile_v1_memory_collections__collection_name__profile_get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/summary":{"get":{"tags":["memories"],"summary":"Collection Summary","description":"Reporting view (\"the board-report trend\"): a concise summary + key themes + notable\nchanges (supersession) for a shared collection. One BOUNDED, CACHED LLM call (cap memories +\nmax_tokens); cached by collection version so repeat reads are free and any write invalidates\nit. Degrades to an extractive summary (top categories) when no LLM is configured — never 500s.\nRememberOS: the last link in the chain — one agent's writes become another's briefing.","operationId":"collection_summary_v1_memory_collections__collection_name__summary_get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/remember":{"post":{"tags":["memories"],"summary":"Remember","description":"Graph memory (PRD-24/1): extract discrete typed facts from raw content and store\neach as its own memory (category = fact|preference|episode).\n\nAsync by default (PRD-25/D): the LLM extraction runs in the background worker so the\nAPI responds immediately — returns 202 with a job_id; poll GET /extract/job/{id}.\nPass `?sync=true` to extract inline and get the facts back in the response.","operationId":"remember_v1_memory_collections__collection_name__remember_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"sync","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Sync"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RememberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/{memory_id}/move":{"post":{"tags":["memories"],"summary":"Move Memory","description":"Move a memory to another collection (vault drag-and-drop). Creates the\ntarget collection if needed.","operationId":"move_memory_v1_memory_collections__collection_name__memories__memory_id__move_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/search":{"post":{"tags":["memories"],"summary":"Search Memories","operationId":"search_memories_v1_memory_collections__collection_name__search_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/bulk":{"post":{"tags":["memories"],"summary":"Bulk Store","operationId":"bulk_store_v1_memory_collections__collection_name__memories_bulk_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemoryCreate"},"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/forget":{"post":{"tags":["memories"],"summary":"Forget Memories","operationId":"forget_memories_v1_memory_collections__collection_name__forget_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/dedup":{"post":{"tags":["memories"],"summary":"Dedup Collection","description":"Find near-identical memories in a collection (cosine >= threshold over the most\nrecent 500) and, unless dry_run, consolidate each cluster down to one keeper (highest\nimportance, then newest). RememberOS intelligent memory — keep shared memory clean.","operationId":"dedup_collection_v1_memory_collections__collection_name__dedup_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DedupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/{memory_id}/pin":{"post":{"tags":["memories"],"summary":"Pin Memory","description":"Pin (or unpin) a memory. Pinned memories are kept by dedup (always the keeper, never\nconsolidated away) and ranked higher in listings.","operationId":"pin_memory_v1_memory_collections__collection_name__memories__memory_id__pin_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/memories/{memory_id}/archive":{"post":{"tags":["memories"],"summary":"Archive Memory","description":"Archive (or restore) a memory. Archived memories are soft-deleted: excluded from\ndefault search and listing, but kept and restorable (archived=false). RememberOS\nintelligent memory — retire stale facts without losing them.","operationId":"archive_memory_v1_memory_collections__collection_name__memories__memory_id__archive_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/archive-stale":{"post":{"tags":["memories"],"summary":"Archive Stale","description":"Bulk-archive memories not updated in the last `older_than_days` days, skipping pinned\nand already-archived ones. dry_run (default) returns the count without changing anything.\nStaleness is measured by updated_at — we deliberately do NOT track per-read access (that\nwould add a write on every recall, which the 4GB box can't afford).","operationId":"archive_stale_v1_memory_collections__collection_name__archive_stale_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveStaleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/contradictions":{"get":{"tags":["memories"],"summary":"Collection Contradictions","description":"Surface where the current truth changed: each place a newer fact superseded an older\none (graph 'updates' edges) — current value alongside the superseded one, newest first.\nRememberOS intelligent memory: a shared collection's evolution made visible.","operationId":"collection_contradictions_v1_memory_collections__collection_name__contradictions_get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/health":{"get":{"tags":["memories"],"summary":"Collection Health","description":"At-a-glance memory-health summary for one collection — how much drift a shared\ncollection has accumulated as agents write to it. Cheap COUNT aggregates only (no\npairwise scan): total / current (is_latest) / archived / pinned / stale (un-pinned,\nun-archived, current, untouched for ``stale_days``) / expired / supersessions (graph\n'updates' edges) / per-category breakdown. RememberOS: keeping shared memory healthy.","operationId":"collection_health_v1_memory_collections__collection_name__health_get","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"stale_days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Stale Days"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/drop":{"post":{"tags":["drop"],"summary":"Drop Files","operationId":"drop_files_v1_memory_collections__collection_name__drop_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_drop_files_v1_memory_collections__collection_name__drop_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/drop/presign":{"post":{"tags":["drop"],"summary":"Presign Drop","description":"Step 1 of direct upload: a presigned PUT URL per file so the browser uploads bytes\nstraight to S3 — bypassing the API as a bottleneck AND any path-based content blocker.\nOversize files are flagged, not signed.","operationId":"presign_drop_v1_memory_collections__collection_name__drop_presign_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PresignFile"},"title":"Files"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/collections/{collection_name}/drop/complete":{"post":{"tags":["drop"],"summary":"Complete Drop","description":"Step 2: after the browser PUTs each file to its presigned URL it reports the keys\nhere; we enqueue them for the worker (download → extract → embed → store). Keys are\nvalidated against the tenant's namespace so a client can't inject a foreign key.","operationId":"complete_drop_v1_memory_collections__collection_name__drop_complete_post","parameters":[{"name":"collection_name","in":"path","required":true,"schema":{"type":"string","title":"Collection Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompleteFile"},"title":"Files"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/search":{"post":{"tags":["search"],"summary":"Search All","description":"Search across every collection the tenant owns.","operationId":"search_all_v1_memory_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/ingest/batch/{batch_id}":{"get":{"tags":["ingest"],"summary":"Get Batch","operationId":"get_batch_v1_memory_ingest_batch__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/extract/job/{job_id}":{"get":{"tags":["ingest"],"summary":"Get Extract Job","description":"Poll async graph-extraction progress (PRD-25/D).","operationId":"get_extract_job_v1_memory_extract_job__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/_internal/embed":{"post":{"tags":["internal"],"summary":"Internal Embed","operationId":"internal_embed_v1_memory__internal_embed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/mcp":{"post":{"tags":["mcp"],"summary":"Mcp Endpoint","operationId":"mcp_endpoint_v1_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/track":{"post":{"tags":["analytics"],"summary":"Track","description":"Record a pageview. Always returns 204 — never errors a visitor's page.","operationId":"track_v1_track_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageView"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pulse":{"post":{"tags":["analytics"],"summary":"Track","description":"Record a pageview. Always returns 204 — never errors a visitor's page.","operationId":"track_v1_pulse_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageView"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/proxy/chat/completions":{"post":{"tags":["proxy"],"summary":"Proxy Chat","operationId":"proxy_chat_v1_proxy_chat_completions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/status":{"get":{"tags":["status"],"summary":"Status","operationId":"status_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/memory/email/address":{"get":{"tags":["email-drop"],"summary":"Get Drop Address","operationId":"get_drop_address_v1_memory_email_address_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropAddress"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/email/address/rotate":{"post":{"tags":["email-drop"],"summary":"Rotate Drop Address","operationId":"rotate_drop_address_v1_memory_email_address_rotate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropAddress"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/email/senders":{"get":{"tags":["email-drop"],"summary":"Get Senders","operationId":"get_senders_v1_memory_email_senders_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAllowlist"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["email-drop"],"summary":"Set Senders","operationId":"set_senders_v1_memory_email_senders_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAllowlist"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAllowlist"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/email/inbound":{"post":{"tags":["email-drop"],"summary":"Inbound Email","description":"Parsed-mail handoff from app/smtp_receiver.py. Shared-secret auth —\nnever exposed publicly (nginx doesn't need to route it; the daemon calls\n127.0.0.1 directly, and without the secret it's a 401 anyway).","operationId":"inbound_email_v1_memory_email_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/memory/admin/tenants":{"post":{"tags":["admin"],"summary":"Create Tenant","operationId":"create_tenant_v1_memory_admin_tenants_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/rotate-key":{"post":{"tags":["admin"],"summary":"Rotate Key","description":"Issue a new API key for the current tenant and invalidate the old one immediately.\n\nAuthenticated by the key being rotated. The previous key stops working as soon as\nthis commits. The new key is returned once and cannot be retrieved later.","operationId":"rotate_key_v1_memory_admin_rotate_key_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/me":{"get":{"tags":["admin"],"summary":"Tenant Profile","operationId":"tenant_profile_v1_memory_admin_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/metrics":{"get":{"tags":["admin"],"summary":"Admin Metrics","description":"Operational request metrics for this worker (PRD-25/1): per-route count, 4xx/5xx\nerror counts, avg/p50/p95 latency. In-process (scope: \"process\"). `?reset=true`\nclears the window after reading. Admin-authed; exposes no other tenant's data.","operationId":"admin_metrics_v1_memory_admin_metrics_get","parameters":[{"name":"reset","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Reset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/analytics":{"get":{"tags":["admin"],"summary":"Admin Analytics","description":"Site-wide funnel + cookieless pageview analytics (PRD-25/4). Aggregates only —\nserved by the SECURITY DEFINER `longmem.admin_analytics()` so it spans all tenants\nwithout weakening RLS (no tenant's rows ever leave the function).","operationId":"admin_analytics_v1_memory_admin_analytics_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/usage":{"get":{"tags":["admin"],"summary":"Admin Usage","description":"Cross-tenant storage + LLM-usage aggregates with cost estimates (PRD-25/2b).\nServed by SECURITY DEFINER longmem.admin_usage() — only names and numbers leave\nthe function; RLS stays intact.","operationId":"admin_usage_v1_memory_admin_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/connectors":{"get":{"tags":["admin"],"summary":"Admin Connectors","description":"Cross-tenant connector-sync health over the last ``hours``: per-provider run count,\nerror count, and last run. Served by SECURITY DEFINER longmem.connection_run_stats()\nso it spans all tenants without weakening RLS (only aggregates leave the function).","operationId":"admin_connectors_v1_memory_admin_connectors_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Hours"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/connectors/status":{"get":{"tags":["admin"],"summary":"Admin Connector Status","description":"Cross-tenant connection counts by status (active / error / paused) so auto-paused or\nfailing connectors surface at a glance. SECURITY DEFINER longmem.connection_status_stats()\n— only counts leave the function, RLS intact.","operationId":"admin_connector_status_v1_memory_admin_connectors_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/memory-health":{"get":{"tags":["admin"],"summary":"Admin Memory Health","description":"Fleet-wide memory hygiene — the cross-tenant companion to the per-collection\nGET /collections/{name}/health. Counts total / current / archived / stale (un-pinned,\nun-archived, current, untouched 90d) / expired / supersessions, plus a single\nneeds_attention roll-up. SECURITY DEFINER longmem.memory_health_stats() — only counts\nleave the function, RLS intact. Cheap COUNTs (no pairwise scan).","operationId":"admin_memory_health_v1_memory_admin_memory_health_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/audit":{"get":{"tags":["admin"],"summary":"Admin Audit","description":"The tenant's own audit log — writes and sensitive actions, newest first (WS3).","operationId":"admin_audit_v1_memory_admin_audit_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/export":{"get":{"tags":["admin"],"summary":"Export Account","description":"GDPR Art. 15/20 — full export of the tenant's data as a JSON download.","operationId":"export_account_v1_memory_admin_export_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/import":{"post":{"tags":["admin"],"summary":"Import Account","description":"Portability companion to GET /export — re-ingest an export dump into this tenant.\n\nKnowledge survives vendor/model changes: the text is RE-EMBEDDED with whatever embedding\nmodel is active here (an export carries text, not vectors), so a dump from any\nRememberOS/LongMem instance restores cleanly regardless of the model that produced it.\nCollections are created as needed; memory ids are reassigned. Pass ``into_collection`` to\ncollapse every memory into one collection. Tenant-scoped (RLS) + explicit tenant_id.\nSupersession edges are not part of an export, so they are not recreated.","operationId":"import_account_v1_memory_admin_import_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/delete-account":{"post":{"tags":["admin"],"summary":"Delete Account","description":"GDPR Art. 17 — irreversible account erasure. Requires typing the tenant name.\nRemoves stored files (best-effort), then the tenant row; FK cascades take\ncollections, memories, edges, api keys, and usage events with it.","operationId":"delete_account_v1_memory_admin_delete_account_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/admin/stats":{"get":{"tags":["admin"],"summary":"Tenant Stats","operationId":"tenant_stats_v1_memory_admin_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/stripe/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_memory_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/memory/stripe/portal":{"post":{"tags":["billing"],"summary":"Create Portal Session","operationId":"create_portal_session_v1_memory_stripe_portal_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/stripe/success":{"get":{"tags":["billing"],"summary":"Checkout Success","operationId":"checkout_success_v1_memory_stripe_success_get","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/stripe/checkout/create":{"post":{"tags":["stripe"],"summary":"Create Checkout Session","operationId":"create_checkout_session_v1_memory_stripe_checkout_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/recover-key":{"post":{"tags":["auth"],"summary":"Recover Api Key","description":"Rotate API key and send new one to user's email (if account exists).\n\nSecurity: Always returns success to prevent email enumeration attacks.\nThe old API key is invalidated when a new one is generated.","operationId":"recover_api_key_v1_memory_recover_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoverKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/reveal/{token}":{"get":{"tags":["auth"],"summary":"Reveal Key","description":"One-time reveal of an API key delivered by a welcome/recovery email link.\nThe token is single-use (atomically deleted on read) and expires after 24h.","operationId":"reveal_key_v1_memory_reveal__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/storage/config":{"get":{"tags":["storage-config"],"summary":"Get Storage Config","operationId":"get_storage_config_v1_memory_storage_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["storage-config"],"summary":"Set Storage Config","operationId":"set_storage_config_v1_memory_storage_config_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3StorageConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["storage-config"],"summary":"Clear Storage Config","description":"Revert to the managed backend by removing the tenant's storage config.","operationId":"clear_storage_config_v1_memory_storage_config_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/database/config":{"get":{"tags":["database-config"],"summary":"Get Database Config","operationId":"get_database_config_v1_memory_database_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["database-config"],"summary":"Set Database Config","operationId":"set_database_config_v1_memory_database_config_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["database-config"],"summary":"Clear Database Config","description":"Revert the data plane to the shared DB. Does not delete the tenant's own data.","operationId":"clear_database_config_v1_memory_database_config_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/extraction/config":{"get":{"tags":["extraction-config"],"summary":"Get Extraction Config","operationId":"get_extraction_config_v1_memory_extraction_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["extraction-config"],"summary":"Set Extraction Config","operationId":"set_extraction_config_v1_memory_extraction_config_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionConfigView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["extraction-config"],"summary":"Clear Extraction Config","description":"Revert to the platform extractor by removing the tenant's extraction config.","operationId":"clear_extraction_config_v1_memory_extraction_config_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/webhook/config":{"get":{"tags":["webhooks"],"summary":"Get Webhook Config","operationId":"get_webhook_config_v1_memory_webhook_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["webhooks"],"summary":"Set Webhook Config","operationId":"set_webhook_config_v1_memory_webhook_config_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["webhooks"],"summary":"Clear Webhook Config","operationId":"clear_webhook_config_v1_memory_webhook_config_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/spend-cap":{"get":{"tags":["spend-cap"],"summary":"Get Spend Cap","operationId":"get_spend_cap_v1_memory_spend_cap_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["spend-cap"],"summary":"Set Spend Cap","operationId":"set_spend_cap_v1_memory_spend_cap_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendCapIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/keys":{"get":{"tags":["api-keys"],"summary":"List Keys","description":"List this tenant's keys. Never returns the hash or the plaintext key.","operationId":"list_keys_v1_memory_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["api-keys"],"summary":"Create Key","description":"Create a new key for this tenant. Returns the plaintext key ONCE.","operationId":"create_key_v1_memory_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Key","description":"Revoke (soft) one of this tenant's keys. Refuses to revoke the last active key.","operationId":"revoke_key_v1_memory_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/signup":{"post":{"tags":["signup"],"summary":"Signup","operationId":"signup_v1_memory_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/connections":{"post":{"tags":["connections"],"summary":"Create Connection","description":"Create a connection. Credentials are encrypted at rest and never returned.","operationId":"create_connection_v1_memory_connections_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["connections"],"summary":"List Connections","description":"List this tenant's connections (no credentials).","operationId":"list_connections_v1_memory_connections_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionResponse"},"title":"Response List Connections V1 Memory Connections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/connections/{connection_id}":{"get":{"tags":["connections"],"summary":"Get Connection","operationId":"get_connection_v1_memory_connections__connection_id__get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["connections"],"summary":"Delete Connection","operationId":"delete_connection_v1_memory_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/connections/{connection_id}/runs":{"get":{"tags":["connections"],"summary":"List Connection Runs","description":"Recent sync runs for this connection (newest first) — status, items synced, errors.","operationId":"list_connection_runs_v1_memory_connections__connection_id__runs_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/connections/{connection_id}/sync":{"post":{"tags":["connections"],"summary":"Sync Now","description":"Trigger a server-side sync of this connection now. Fetches new records from the\nprovider and ingests them into the connection's collection. Returns the run summary.","operationId":"sync_now_v1_memory_connections__connection_id__sync_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/connections/oauth/{provider}/start":{"get":{"tags":["connections"],"summary":"Oauth Start","description":"Begin the OAuth connect flow: returns the provider consent URL to redirect to.\n503 if this provider's OAuth app is not configured (paste-a-token still works).","operationId":"oauth_start_v1_memory_connections_oauth__provider__start_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"collection","in":"query","required":false,"schema":{"type":"string","maxLength":120,"default":"default","title":"Collection"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/connections/oauth/{provider}/callback":{"get":{"tags":["connections"],"summary":"Oauth Callback","description":"OAuth redirect target. Exchanges the code for a token and stores the connection,\nthen bounces the browser back to the dashboard. No API key — trust comes from `state`.","operationId":"oauth_callback_v1_memory_connections_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/memory/agents":{"get":{"tags":["agents"],"summary":"List Agents","description":"List this tenant's agent identities (active api keys). No key material is returned.","operationId":"list_agents_v1_memory_agents_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ArchiveRequest":{"properties":{"archived":{"type":"boolean","title":"Archived","default":true}},"type":"object","title":"ArchiveRequest"},"ArchiveStaleRequest":{"properties":{"older_than_days":{"type":"integer","minimum":1.0,"title":"Older Than Days","default":90},"dry_run":{"type":"boolean","title":"Dry Run","default":true}},"type":"object","title":"ArchiveStaleRequest"},"Body_drop_files_v1_memory_collections__collection_name__drop_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","default":0.7},"metadata":{"type":"string","title":"Metadata","default":"{}"},"async_ingest":{"type":"boolean","title":"Async Ingest","default":false}},"type":"object","required":["files"],"title":"Body_drop_files_v1_memory_collections__collection_name__drop_post"},"Body_store_folder_v1_memory_collections__collection_name__memories_folder_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"text_template":{"type":"string","title":"Text Template","default":"{filename}"},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","default":0.7},"category":{"type":"string","maxLength":50,"title":"Category","default":"other"},"source":{"type":"string","maxLength":50,"title":"Source","default":"api"},"metadata":{"type":"string","title":"Metadata","default":"{}"}},"type":"object","required":["files"],"title":"Body_store_folder_v1_memory_collections__collection_name__memories_folder_post"},"Body_store_memory_with_images_v1_memory_collections__collection_name__memories_upload_post":{"properties":{"text":{"type":"string","maxLength":10000,"minLength":1,"title":"Text"},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","default":0.7},"category":{"type":"string","maxLength":50,"title":"Category","default":"other"},"source":{"type":"string","maxLength":50,"title":"Source","default":"api"},"metadata":{"type":"string","title":"Metadata","default":"{}"},"images":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Images","default":[]}},"type":"object","required":["text"],"title":"Body_store_memory_with_images_v1_memory_collections__collection_name__memories_upload_post"},"Body_upload_memory_image_v1_memory_collections__collection_name__memories__memory_id__images_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"}},"type":"object","required":["image"],"title":"Body_upload_memory_image_v1_memory_collections__collection_name__memories__memory_id__images_post"},"BulkCreateResponse":{"properties":{"created":{"type":"integer","title":"Created"},"ids":{"items":{"type":"string"},"type":"array","title":"Ids"}},"type":"object","required":["created","ids"],"title":"BulkCreateResponse"},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"}},"type":"object","required":["role"],"title":"ChatMessage"},"CheckoutRequest":{"properties":{"tier":{"type":"string","title":"Tier"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"type":"object","required":["tier"],"title":"CheckoutRequest"},"CollectionCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","title":"Name"},"description":{"type":"string","title":"Description","default":""},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name"],"title":"CollectionCreate"},"CollectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"memory_count":{"type":"integer","title":"Memory Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","metadata","created_at","updated_at"],"title":"CollectionResponse"},"CollectionUpdate":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"CollectionUpdate"},"CompleteFile":{"properties":{"key":{"type":"string","title":"Key"},"filename":{"type":"string","title":"Filename"},"mime":{"type":"string","title":"Mime","default":"application/octet-stream"},"size":{"type":"integer","title":"Size","default":0}},"type":"object","required":["key","filename"],"title":"CompleteFile"},"ConnectionCreate":{"properties":{"provider":{"type":"string","maxLength":40,"title":"Provider"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"collection":{"type":"string","maxLength":120,"title":"Collection","default":"default"},"container_tag":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Container Tag"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials"}},"type":"object","required":["provider"],"title":"ConnectionCreate"},"ConnectionResponse":{"properties":{"id":{"type":"string","title":"Id"},"provider":{"type":"string","title":"Provider"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"collection":{"type":"string","title":"Collection"},"container_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Tag"},"status":{"type":"string","title":"Status"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","provider","collection","status","created_at"],"title":"ConnectionResponse"},"CreateKeyIn":{"properties":{"label":{"type":"string","maxLength":80,"title":"Label","default":"api key"},"read_only":{"type":"boolean","title":"Read Only","default":false}},"type":"object","title":"CreateKeyIn"},"DatabaseConfig":{"properties":{"backend":{"type":"string","pattern":"^postgres$","title":"Backend","default":"postgres"},"dsn":{"type":"string","minLength":1,"title":"Dsn","description":"postgres://user:pass@host:port/db"}},"type":"object","required":["dsn"],"title":"DatabaseConfig"},"DatabaseConfigView":{"properties":{"backend":{"type":"string","title":"Backend"},"host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Host"}},"type":"object","required":["backend"],"title":"DatabaseConfigView"},"DedupRequest":{"properties":{"threshold":{"type":"number","maximum":1.0,"minimum":0.5,"title":"Threshold","default":0.95},"dry_run":{"type":"boolean","title":"Dry Run","default":true}},"type":"object","title":"DedupRequest"},"DeleteAccountRequest":{"properties":{"confirm":{"type":"string","title":"Confirm"}},"type":"object","required":["confirm"],"title":"DeleteAccountRequest"},"DropAddress":{"properties":{"address":{"type":"string","title":"Address"}},"type":"object","required":["address"],"title":"DropAddress"},"DropFileResult":{"properties":{"filename":{"type":"string","title":"Filename"},"kind":{"type":"string","title":"Kind"},"transcribed":{"type":"boolean","title":"Transcribed"},"memory_ids":{"items":{"type":"string"},"type":"array","title":"Memory Ids"},"chars":{"type":"integer","title":"Chars"},"preview":{"type":"string","title":"Preview"},"file_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Key"},"flagged":{"items":{"type":"string"},"type":"array","title":"Flagged","default":[]}},"type":"object","required":["filename","kind","transcribed","memory_ids","chars","preview"],"title":"DropFileResult"},"DropResponse":{"properties":{"created":{"type":"integer","title":"Created"},"files":{"items":{"$ref":"#/components/schemas/DropFileResult"},"type":"array","title":"Files"}},"type":"object","required":["created","files"],"title":"DropResponse"},"ExtractionConfig":{"properties":{"provider":{"type":"string","pattern":"^custom$","title":"Provider","default":"custom"},"base_url":{"type":"string","minLength":1,"title":"Base Url"},"model":{"type":"string","minLength":1,"title":"Model"},"api_key":{"type":"string","minLength":1,"title":"Api Key"}},"type":"object","required":["base_url","model","api_key"],"title":"ExtractionConfig"},"ExtractionConfigView":{"properties":{"provider":{"type":"string","title":"Provider"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","required":["provider"],"title":"ExtractionConfigView","description":"Safe view — never includes the key."},"FolderUploadFileResult":{"properties":{"id":{"type":"string","title":"Id"},"filename":{"type":"string","title":"Filename"},"text":{"type":"string","title":"Text"},"file_key":{"type":"string","title":"File Key"},"file_size":{"type":"integer","title":"File Size"}},"type":"object","required":["id","filename","text","file_key","file_size"],"title":"FolderUploadFileResult"},"FolderUploadResponse":{"properties":{"created":{"type":"integer","title":"Created"},"ids":{"items":{"type":"string"},"type":"array","title":"Ids"},"files":{"items":{"$ref":"#/components/schemas/FolderUploadFileResult"},"type":"array","title":"Files"}},"type":"object","required":["created","ids","files"],"title":"FolderUploadResponse"},"ForgetRequest":{"properties":{"query":{"type":"string","maxLength":2000,"minLength":1,"title":"Query"},"min_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Score","default":0.5},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":10}},"type":"object","required":["query"],"title":"ForgetRequest"},"GrantIn":{"properties":{"agent_key_id":{"type":"string","title":"Agent Key Id"},"can_read":{"type":"boolean","title":"Can Read","default":true},"can_write":{"type":"boolean","title":"Can Write","default":true}},"type":"object","required":["agent_key_id"],"title":"GrantIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageUploadResponse":{"properties":{"index":{"type":"integer","title":"Index"},"key":{"type":"string","title":"Key"},"filename":{"type":"string","title":"Filename"},"mime":{"type":"string","title":"Mime"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["index","key","filename","mime","size"],"title":"ImageUploadResponse"},"ImportRequest":{"properties":{"memories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Memories"},"collections":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Collections"},"into_collection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Into Collection"}},"type":"object","required":["memories"],"title":"ImportRequest"},"MemoryCreate":{"properties":{"text":{"type":"string","maxLength":10000,"minLength":1,"title":"Text"},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","default":0.7},"category":{"type":"string","maxLength":50,"title":"Category","default":"other"},"source":{"type":"string","maxLength":50,"title":"Source","default":"api"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"container_tag":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Container Tag"}},"type":"object","required":["text"],"title":"MemoryCreate"},"MemoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"importance":{"type":"number","title":"Importance"},"category":{"type":"string","title":"Category"},"source":{"type":"string","title":"Source"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"images":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Images"},"created_by":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Created By"},"pinned":{"type":"boolean","title":"Pinned","default":false},"archived":{"type":"boolean","title":"Archived","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","text","importance","category","source","metadata","created_at","updated_at"],"title":"MemoryResponse"},"MemorySearch":{"properties":{"query":{"type":"string","maxLength":2000,"minLength":1,"title":"Query"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":5},"min_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Score","default":0.3},"mode":{"type":"string","enum":["vector","text","hybrid"],"title":"Mode","default":"hybrid"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"metadata_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Filter"},"container_tag":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Container Tag"},"rewrite":{"type":"boolean","title":"Rewrite","default":false},"rerank":{"type":"boolean","title":"Rerank","default":false},"include_archived":{"type":"boolean","title":"Include Archived","default":false}},"type":"object","required":["query"],"title":"MemorySearch"},"MemorySearchResult":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"category":{"type":"string","title":"Category"},"importance":{"type":"number","title":"Importance"},"score":{"type":"number","title":"Score"},"source":{"type":"string","title":"Source"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"images":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Images"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"collection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection"}},"type":"object","required":["id","text","category","importance","score","source","metadata","created_at"],"title":"MemorySearchResult"},"MemoryUpdate":{"properties":{"text":{"anyOf":[{"type":"string","maxLength":10000,"minLength":1},{"type":"null"}],"title":"Text"},"importance":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Importance"},"category":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Category"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"MemoryUpdate","description":"Partial update — only provided fields change. Updating `text` re-embeds."},"MoveRequest":{"properties":{"to_collection":{"type":"string","maxLength":128,"minLength":1,"title":"To Collection"}},"type":"object","required":["to_collection"],"title":"MoveRequest"},"PageView":{"properties":{"path":{"type":"string","maxLength":512,"title":"Path"},"referrer":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Referrer"}},"type":"object","required":["path"],"title":"PageView"},"PinRequest":{"properties":{"pinned":{"type":"boolean","title":"Pinned","default":true}},"type":"object","title":"PinRequest"},"PresignFile":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type","default":"application/octet-stream"},"size":{"type":"integer","title":"Size","default":0}},"type":"object","required":["filename"],"title":"PresignFile"},"ProxyChatRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","minItems":1,"title":"Messages"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"collection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection"},"container_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Tag"},"memory_limit":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Memory Limit","default":5},"store":{"type":"boolean","title":"Store","default":true},"stream":{"type":"boolean","title":"Stream","default":false},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"}},"type":"object","required":["messages"],"title":"ProxyChatRequest"},"RecoverKeyRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"RecoverKeyRequest"},"RememberRequest":{"properties":{"content":{"type":"string","maxLength":20000,"minLength":1,"title":"Content"},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","default":0.7}},"type":"object","required":["content"],"title":"RememberRequest"},"S3StorageConfig":{"properties":{"backend":{"type":"string","pattern":"^s3$","title":"Backend","default":"s3"},"endpoint_url":{"type":"string","minLength":1,"title":"Endpoint Url"},"bucket":{"type":"string","minLength":1,"title":"Bucket"},"region":{"type":"string","title":"Region","default":"auto"},"access_key":{"type":"string","minLength":1,"title":"Access Key"},"secret_key":{"type":"string","minLength":1,"title":"Secret Key"}},"type":"object","required":["endpoint_url","bucket","access_key","secret_key"],"title":"S3StorageConfig"},"SearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/MemorySearchResult"},"type":"array","title":"Results"},"query_embedding_ms":{"type":"number","title":"Query Embedding Ms"},"search_ms":{"type":"number","title":"Search Ms"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["results","query_embedding_ms","search_ms"],"title":"SearchResponse"},"SenderAllowlist":{"properties":{"senders":{"items":{"type":"string"},"type":"array","title":"Senders"}},"type":"object","required":["senders"],"title":"SenderAllowlist"},"SignupIn":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"}},"type":"object","required":["email"],"title":"SignupIn"},"SpendCapIn":{"properties":{"monthly_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Monthly Usd","description":"Monthly USD cap, or null to clear"}},"type":"object","title":"SpendCapIn"},"StorageConfigView":{"properties":{"backend":{"type":"string","title":"Backend"},"endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Url"},"bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"}},"type":"object","required":["backend"],"title":"StorageConfigView","description":"Safe view — never includes the secret."},"TenantCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"tier":{"type":"string","title":"Tier","default":"pro"}},"type":"object","required":["name"],"title":"TenantCreate"},"TenantResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"api_key":{"type":"string","title":"Api Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","email","api_key","created_at"],"title":"TenantResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookConfigIn":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"HTTPS endpoint that receives events"}},"type":"object","required":["url"],"title":"WebhookConfigIn"}}},"tags":[{"name":"collections","description":"Create and list memory collections."},{"name":"memories","description":"Store, search, update, and delete memories; graph /remember."},{"name":"api-keys","description":"Manage your API keys (list/create/revoke)."},{"name":"spend-cap","description":"Per-tenant monthly platform-LLM spend cap."},{"name":"webhooks","description":"Configure HMAC-signed event webhooks."},{"name":"status","description":"Public service status (no auth)."},{"name":"proxy","description":"OpenAI-compatible chat with automatic memory."}]}