Parameters
List of
CreateMemoryRequest objects. Each entry has the same fields as memories.create (document, document_type, user_id, customer_id, mode, metadata, etc.). customer_id is required on B2B and not accepted on B2C, where an entry carrying it is rejected with HTTP 400 (B2C vs B2B); mode is the ingestion axis (fast vs long-range) of Retrieval Modes.If
True, the entire batch is rejected as soon as any single document fails validation. If False (default), valid documents are accepted and invalid ones are returned with error_message populated in the per-item result.Returns
BatchCreateResponse with aggregate counts and per-document results.
Per-document results. Each contains
ingestion_id, document_id, status, queued_at, and an optional error_message if that document was rejected.Example
Raises
AuthenticationError: when the API key is missing or invalid.ValidationError(Python, pydantic, aValueErrorsubclass): aCreateMemoryRequestin the batch has an invalid field, raised when you build it.InvalidInputError: Synap rejected the batch (HTTP 400 or 422), or in JavaScript and TypeScript the SDK rejected an emptydocumentsarray or an invaliddocument_typeormode.