## Add document `add(ClientAddParams**kwargs) -> AddResponse` **post** `/v3/documents` Add a document with any content type (text, url, file, etc.) and metadata ### Parameters - `content: str` The content to extract and process into a document. This can be a URL to a website, a PDF, an image, or a video. - `container_tag: Optional[str]` Optional tag this document should be containerized by. Max 100 characters, alphanumeric with hyphens, underscores, and dots only. - `container_tags: Optional[Sequence[str]]` - `custom_id: Optional[str]` Optional custom ID of the document. Max 100 characters, alphanumeric with hyphens, underscores, and dots only. - `entity_context: Optional[str]` Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction. - `filepath: Optional[str]` Optional file path for the document. Used by supermemoryfs to store the full path of the file. - `filter_by_metadata: Optional[Dict[str, Union[str, float, bool, Sequence[str]]]]` Optional metadata filter to apply when pulling related memories and profile during ingestion. Only memories matching these filters will be used as context. - `str` - `float` - `bool` - `Sequence[str]` - `metadata: Optional[Dict[str, Union[str, float, bool, Sequence[str]]]]` Optional metadata for the document. - `str` - `float` - `bool` - `Sequence[str]` - `task_type: Optional[Literal["memory", "superrag"]]` Task type: "memory" (default) for full context layer with SuperRAG built in, "superrag" for managed RAG as a service. - `"memory"` - `"superrag"` ### Returns - `class AddResponse: …` - `id: str` Unique identifier of the document - `status: str` Status of the document ### Example ```python import os from supermemory import Supermemory client = Supermemory( api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted ) response = client.add( content="content", ) print(response.id) ``` #### Response ```json { "id": "id", "status": "status" } ```