Device memory reuses the existing memories.create and memories.search endpoints. Pass snapshot or snapshot_ref instead of collection_id — they are mutually exclusive.
All endpoints require authentication via X-API-Key header (or Authorization: Bearer <token>).
The existing /v1/memories endpoint accepts a snapshot or snapshot_ref field instead of collection_id. When a snapshot source is provided, Nebula processes the content statelessly and returns an updated snapshot or writes the updated snapshot to your signed URL.
POST /v1/memories
Field
Type
Required
Description
snapshot
object
Yes, unless using snapshot_ref
Your current snapshot (mutually exclusive with collection_id and snapshot_ref)
snapshot_ref
object
Yes, unless using snapshot
Signed URL reference for customer-owned snapshot storage
raw_text
string
Yes
Content to store
metadata
object
No
Arbitrary metadata
Returns { "snapshot": <updated_snapshot> } when using device memory mode.
result = client.memories.create( snapshot=snapshot, raw_text="Had a meeting with Alice about the Q2 roadmap",).resultssnapshot = result.snapshot
With customer-owned snapshot storage, provide a signed URL reference:
curl -X POST "https://api.zeroset.com/v1/memories" \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "snapshot_ref": { "type": "signed_url", "collection_id": "YOUR_COLLECTION_ID", "get_url": "https://storage.example.com/signed-get-url", "put_url": "https://storage.example.com/signed-put-url" }, "raw_text": "Had a meeting with Alice about the Q2 roadmap" }'
The existing /v1/memories/search endpoint accepts a snapshot or snapshot_ref field instead of collection_ids. Nebula scores your snapshot statelessly and returns results. Nothing is persisted.
POST /v1/memories/search
Field
Type
Required
Description
snapshot
object
Yes, unless using snapshot_ref
Your full snapshot (mutually exclusive with collection_ids and snapshot_ref)
snapshot_ref
object
Yes, unless using snapshot
Signed URL reference for customer-owned snapshot storage
query
string
Yes
Natural language search query
Returns a graph-shaped SnapshotSearchResult: entities (each with id, name, category, description, score) and relationships (each with id, subject_id, object_id, predicate, description, weight). This is distinct from the standard MemoryResponse returned by collection-based search.
results = client.memories.search( query="What do I know about Alice?", snapshot=snapshot,).resultsfor entity in results.entities or []: print(f"{entity.name} ({entity.category}): {entity.description}")for rel in results.relationships or []: print(f"{rel.subject_id} -[{rel.predicate}]-> {rel.object_id}")
Search can also load the snapshot through a signed URL:
curl -X POST "https://api.zeroset.com/v1/memories/search" \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "snapshot_ref": { "type": "signed_url", "collection_id": "YOUR_COLLECTION_ID", "get_url": "https://storage.example.com/signed-get-url" }, "query": "What do I know about Alice?" }'
Collection UUID Nebula authorizes before using the URL
get_url
For reads
Short-lived signed URL Nebula can GET
put_url
For writes
Short-lived signed URL Nebula can PUT
get_headers
No
Additional headers for the GET request
put_headers
No
Additional headers for the PUT request
Signed URLs must use public HTTPS destinations. Nebula rejects private, loopback, and link-local hosts, does not follow redirects, and caps snapshot download size.