Skip to content
Get started

Documents

Add document
documents.add(DocumentAddParams**kwargs) -> DocumentAddResponse
POST/v3/documents
List documents
documents.list(DocumentListParams**kwargs) -> DocumentListResponse
POST/v3/documents/list
Update document
documents.update(strid, DocumentUpdateParams**kwargs) -> DocumentUpdateResponse
PATCH/v3/documents/{id}
Get document
documents.get(strid) -> DocumentGetResponse
GET/v3/documents/{id}
Delete document by ID or customId
documents.delete(strid)
DELETE/v3/documents/{id}
Bulk delete documents
documents.delete_bulk(DocumentDeleteBulkParams**kwargs) -> DocumentDeleteBulkResponse
DELETE/v3/documents/bulk
Upload a file
documents.upload_file(DocumentUploadFileParams**kwargs) -> DocumentUploadFileResponse
POST/v3/documents/file
Batch add documents
documents.batch_add(DocumentBatchAddParams**kwargs) -> DocumentBatchAddResponse
POST/v3/documents/batch
Get processing documents
documents.list_processing() -> DocumentListProcessingResponse
GET/v3/documents/processing
ModelsExpand Collapse
class DocumentAddResponse:
id: str

Unique identifier of the document

status: str

Status of the document

class DocumentListResponse:

List of documents

memories: List[Memory]
id: str

Unique identifier of the document.

minLength22
maxLength22
connection_id: Optional[str]

Optional ID of connection the document was created from. This is useful for identifying the source of the document.

minLength22
maxLength22
created_at: str

Creation timestamp

formatdatetime
custom_id: Optional[str]

Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document.

maxLength255
filepath: Optional[str]
metadata: Union[str, float, bool, 3 more]

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.

One of the following:
str
float
bool
Dict[str, object]
List[object]
status: Literal["unknown", "queued", "extracting", 5 more]

Status of the document

One of the following:
"unknown"
"queued"
"extracting"
"chunking"
"embedding"
"indexing"
"done"
"failed"
summary: Optional[str]

Summary of the document content

title: Optional[str]

Title of the document

type: Literal["text", "pdf", "tweet", 10 more]

Type of the document

One of the following:
"text"
"pdf"
"tweet"
"google_doc"
"google_slide"
"google_sheet"
"image"
"video"
"audio"
"notion_doc"
"webpage"
"onedrive"
"github_markdown"
updated_at: str

Last update timestamp

formatdatetime
Deprecatedcontainer_tags: Optional[List[str]]

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.

content: Optional[str]

Content of the document (only included when includeContent=true)

url: Optional[str]

URL of the document

class DocumentUpdateResponse:
id: str

Unique identifier of the document

status: str

Status of the document

class DocumentGetResponse:

Document object

id: str

Unique identifier of the document.

minLength22
maxLength22
connection_id: Optional[str]

Optional ID of connection the document was created from. This is useful for identifying the source of the document.

minLength22
maxLength22
content: Optional[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.

Plaintext: Any plaintext format

URL: A URL to a website, PDF, image, or video

We automatically detect the content type from the url’s response format.

created_at: str

Creation timestamp

formatdatetime
custom_id: Optional[str]

Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document.

maxLength255
dreaming_status: Literal["dreaming", "done"]
One of the following:
"dreaming"
"done"
filepath: Optional[str]
metadata: Union[str, float, bool, 3 more]

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.

One of the following:
str
float
bool
Dict[str, object]
List[object]
og_image: Optional[str]
raw: object

Raw content of the document

source: Optional[str]

Source of the document

maxLength255
status: Literal["unknown", "queued", "extracting", 5 more]

Status of the document

One of the following:
"unknown"
"queued"
"extracting"
"chunking"
"embedding"
"indexing"
"done"
"failed"
summary: Optional[str]

Summary of the document content

task_type: Literal["memory", "superrag"]

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

One of the following:
"memory"
"superrag"
title: Optional[str]

Title of the document

type: Literal["text", "pdf", "tweet", 10 more]

Type of the document

One of the following:
"text"
"pdf"
"tweet"
"google_doc"
"google_slide"
"google_sheet"
"image"
"video"
"audio"
"notion_doc"
"webpage"
"onedrive"
"github_markdown"
updated_at: str

Last update timestamp

formatdatetime
Deprecatedcontainer_tags: Optional[List[str]]

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.

url: Optional[str]

URL of the document

class DocumentDeleteBulkResponse:

Response for bulk document deletion

deleted_count: float

Number of documents successfully deleted

success: bool

Whether the bulk deletion was successful

Deprecatedcontainer_tags: Optional[List[str]]

Container tags that were processed (only applicable when deleting by container tags)

errors: Optional[List[Error]]

Array of errors for documents that couldn’t be deleted (only applicable when deleting by IDs)

id: str
error: str
class DocumentUploadFileResponse:
id: str

Unique identifier of the document

status: str

Status of the document

class DocumentBatchAddResponse:
failed: float

Count of documents that failed to add

results: List[Result]

Array of results for each document in the batch

id: str

Unique identifier of the document (empty string for failed items)

status: str

Status of the document (e.g. ‘done’, ‘queued’, ‘error’)

details: Optional[str]

Additional error details when status is ‘error’

error: Optional[str]

Error message when status is ‘error’

success: float

Count of documents successfully added

class DocumentListProcessingResponse:

List of documents currently being processed

documents: List[Document]
id: str

Unique identifier of the document.

minLength22
maxLength22
created_at: str

Creation timestamp

formatdatetime
custom_id: Optional[str]

Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document.

maxLength255
metadata: Union[str, float, bool, 3 more]

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.

One of the following:
str
float
bool
Dict[str, object]
List[object]
status: Literal["unknown", "queued", "extracting", 5 more]

Status of the document

One of the following:
"unknown"
"queued"
"extracting"
"chunking"
"embedding"
"indexing"
"done"
"failed"
title: Optional[str]

Title of the document

type: Literal["text", "pdf", "tweet", 10 more]

Type of the document

One of the following:
"text"
"pdf"
"tweet"
"google_doc"
"google_slide"
"google_sheet"
"image"
"video"
"audio"
"notion_doc"
"webpage"
"onedrive"
"github_markdown"
updated_at: str

Last update timestamp

formatdatetime
Deprecatedcontainer_tags: Optional[List[str]]

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.

total_count: float

Total number of processing documents