Skip to content
Get started

Documents

Create Batch Pipeline Documents
pipelines.documents.create(strpipeline_id, DocumentCreateParams**kwargs) -> DocumentCreateResponse
POST/api/v1/pipelines/{pipeline_id}/documents
Paginated List Pipeline Documents
pipelines.documents.list(strpipeline_id, DocumentListParams**kwargs) -> SyncPaginatedCloudDocuments[CloudDocument]
GET/api/v1/pipelines/{pipeline_id}/documents/paginated
Get Pipeline Document
pipelines.documents.get(strdocument_id, DocumentGetParams**kwargs) -> CloudDocument
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}
Delete Pipeline Document
pipelines.documents.delete(strdocument_id, DocumentDeleteParams**kwargs)
DELETE/api/v1/pipelines/{pipeline_id}/documents/{document_id}
Get Pipeline Document Status
pipelines.documents.get_status(strdocument_id, DocumentGetStatusParams**kwargs) -> ManagedIngestionStatusResponse
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}/status
Sync Pipeline Document
pipelines.documents.sync(strdocument_id, DocumentSyncParams**kwargs) -> object
POST/api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync
List Pipeline Document Chunks
pipelines.documents.get_chunks(strdocument_id, DocumentGetChunksParams**kwargs) -> DocumentGetChunksResponse
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}/chunks
Upsert Batch Pipeline Documents
pipelines.documents.upsert(strpipeline_id, DocumentUpsertParams**kwargs) -> DocumentUpsertResponse
PUT/api/v1/pipelines/{pipeline_id}/documents
ModelsExpand Collapse
class CloudDocument:

Cloud document stored in S3.

id: str
metadata: Dict[str, object]
text: str
excluded_embed_metadata_keys: Optional[List[str]]
excluded_llm_metadata_keys: Optional[List[str]]
page_positions: Optional[List[int]]

indices in the CloudDocument.text where a new page begins. e.g. Second page starts at index specified by page_positions[1].

status_metadata: Optional[Dict[str, object]]
class CloudDocumentCreate:

Create a new cloud document.

metadata: Dict[str, object]
text: str
id: Optional[str]
excluded_embed_metadata_keys: Optional[List[str]]
excluded_llm_metadata_keys: Optional[List[str]]
page_positions: Optional[List[int]]

indices in the CloudDocument.text where a new page begins. e.g. Second page starts at index specified by page_positions[1].

class TextNode:

Provided for backward compatibility.

Note: we keep the field with the typo "seperator" to maintain backward compatibility for serialized objects.

class_name: Optional[str]
embedding: Optional[List[float]]

Embedding of the node.

end_char_idx: Optional[int]

End char index of the node.

excluded_embed_metadata_keys: Optional[List[str]]

Metadata keys that are excluded from text for the embed model.

excluded_llm_metadata_keys: Optional[List[str]]

Metadata keys that are excluded from text for the LLM.

extra_info: Optional[Dict[str, object]]

A flat dictionary of metadata fields

id: Optional[str]

Unique ID of the node.

metadata_seperator: Optional[str]

Separator between metadata fields when converting to string.

metadata_template: Optional[str]

Template for how metadata is formatted, with {key} and {value} placeholders.

mimetype: Optional[str]

MIME type of the node content.

relationships: Optional[Dict[str, Relationships]]

A mapping of relationships to other node information.

Accepts one of the following:
class RelationshipsRelatedNodeInfo:
node_id: str
class_name: Optional[str]
hash: Optional[str]
metadata: Optional[Dict[str, object]]
node_type: Optional[Union[Literal["1", "2", "3", 2 more], str, null]]
Accepts one of the following:
Literal["1", "2", "3", 2 more]
Accepts one of the following:
"1"
"2"
"3"
"4"
"5"
str
List[RelationshipsUnionMember1]
node_id: str
class_name: Optional[str]
hash: Optional[str]
metadata: Optional[Dict[str, object]]
node_type: Optional[Union[Literal["1", "2", "3", 2 more], str, null]]
Accepts one of the following:
Literal["1", "2", "3", 2 more]
Accepts one of the following:
"1"
"2"
"3"
"4"
"5"
str
start_char_idx: Optional[int]

Start char index of the node.

text: Optional[str]

Text content of the node.

text_template: Optional[str]

Template for how text is formatted, with {content} and {metadata_str} placeholders.