v4

latestOpenAPI 3.1.02026-08-01420618.8 KB
Ingest

Batch add documents

Add multiple documents in a single request. Each document can have any content type (text, url, file, etc.) and metadata

post/v3/documents/batch

Request body

containerTagstring

Optional tag this document should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to group documents.

containerTagsstring[]

(DEPRECATED: Use containerTag instead) Optional tags this document should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to group documents.

metadataobject

Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects.

taskType'memory' | 'superrag'

Task type: "memory" (default) for full context layer with SuperRAG built in, "superrag" for managed RAG as a service.

filepathstring

Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used by supermemoryfs to map documents to filesystem paths.

filterByMetadataobject

Optional metadata filter scoping which existing memories are pulled as context during ingestion. Scalar values match exactly (AND across keys); array values match ANY (OR within key). Only memories whose source documents match this filter are used as context.

entityContextstring

Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction.

dreaming'instant' | 'dynamic'

Processing mode. "dynamic" (default) groups related documents together so memories form from coherent, logical units rather than one isolated entry at a time. "instant" processes each document on its own right away, and bills one extra operation per document.

{"stackTrail":"paths:/v3/documents/batch:post:requestBody:content:application/json:schema:properties:content","oasType":"schema","type":"unknown"}

Example request

{
  "containerTag": "user_alex",
  "metadata": {
    "source": "upload",
    "language": "en"
  },
  "taskType": "memory",
  "filepath": "/documents/reports/file.pdf",
  "filterByMetadata": {
    "department": "engineering",
    "region": "us"
  },
  "entityContext": "User's name is {XYZ}",
  "dreaming": "instant",
  "documents": [
    {
      "containerTag": "user_alex",
      "content": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.",
      "customId": "doc-api-rate-limits",
      "metadata": {
        "source": "upload",
        "language": "en"
      },
      "taskType": "memory",
      "filepath": "/documents/reports/file.pdf",
      "filterByMetadata": {
        "department": "engineering",
        "region": "us"
      },
      "entityContext": "User's name is {XYZ}",
      "dreaming": "instant"
    }
  ]
}

Response

Documents added successfully

failednumber required

Count of documents that failed to add

successnumber required

Count of documents successfully added