file_path, file, or text must be provided.
Parameters
string
required
The user this memory is about.
string
required
The customer this memory belongs to. Required on B2B; auto-resolved on B2C. See B2C vs B2B.
string
Scope hint for the upload. One of
"b2c" (default) or "b2b".string
Path on disk to read and upload. Mutually exclusive with
file and text.IO[bytes]
An open binary file-like object. When using this, you must also pass
filename. Mutually exclusive with file_path and text.string
Name to use for the upload. Required when passing
file=.string
Raw text content to ingest instead of a file. Mutually exclusive with
file_path and file.string
Override the auto-detected document type (for example,
"pdf", "email", "meeting-transcript").string
Ingestion mode:
"fast" or "long-range" (default), the ingestion axis of Retrieval Modes.object
Additional metadata to attach to the memory. Serialized to JSON before upload.
Returns
CreateMemoryResponse with the ingestion job identifiers and initial status.
UUID
Unique identifier for tracking this ingestion job.
string
The document identifier assigned to the upload.
string
Initial status of the ingestion job. Typically
queued.datetime
Timestamp at which the job was accepted into the queue.
Example
Raises
ValueError: when none offile_path,file, ortextis provided.SynapAuthError: when the API key is missing or invalid.SynapValidationError: when the upload payload is malformed.