Skip to content
Get started

Documents

Create Batch Pipeline Documents
client.pipelines.documents.create(stringpipelineID, DocumentCreateParams { body } params, RequestOptionsoptions?): DocumentCreateResponse { id, metadata, text, 4 more }
POST/api/v1/pipelines/{pipeline_id}/documents
Paginated List Pipeline Documents
client.pipelines.documents.list(stringpipelineID, DocumentListParams { file_id, limit, only_api_data_source_documents, 3 more } query?, RequestOptionsoptions?): PaginatedCloudDocuments<CloudDocument { id, metadata, text, 4 more } >
GET/api/v1/pipelines/{pipeline_id}/documents/paginated
Get Pipeline Document
client.pipelines.documents.get(stringdocumentID, DocumentGetParams { pipeline_id } params, RequestOptionsoptions?): CloudDocument { id, metadata, text, 4 more }
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}
Delete Pipeline Document
client.pipelines.documents.delete(stringdocumentID, DocumentDeleteParams { pipeline_id } params, RequestOptionsoptions?): void
DELETE/api/v1/pipelines/{pipeline_id}/documents/{document_id}
Get Pipeline Document Status
client.pipelines.documents.getStatus(stringdocumentID, DocumentGetStatusParams { pipeline_id } params, RequestOptionsoptions?): ManagedIngestionStatusResponse { status, deployment_date, effective_at, 2 more }
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}/status
Sync Pipeline Document
client.pipelines.documents.sync(stringdocumentID, DocumentSyncParams { pipeline_id } params, RequestOptionsoptions?): DocumentSyncResponse
POST/api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync
List Pipeline Document Chunks
client.pipelines.documents.getChunks(stringdocumentID, DocumentGetChunksParams { pipeline_id } params, RequestOptionsoptions?): DocumentGetChunksResponse { class_name, embedding, end_char_idx, 11 more }
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}/chunks
Upsert Batch Pipeline Documents
client.pipelines.documents.upsert(stringpipelineID, DocumentUpsertParams { body } params, RequestOptionsoptions?): DocumentUpsertResponse { id, metadata, text, 4 more }
PUT/api/v1/pipelines/{pipeline_id}/documents
ModelsExpand Collapse
CloudDocument { id, metadata, text, 4 more }

Cloud document stored in S3.

id: string
metadata: Record<string, unknown>
text: string
excluded_embed_metadata_keys?: Array<string>
excluded_llm_metadata_keys?: Array<string>
page_positions?: Array<number> | null

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

status_metadata?: Record<string, unknown> | null
CloudDocumentCreate { metadata, text, id, 3 more }

Create a new cloud document.

metadata: Record<string, unknown>
text: string
id?: string | null
excluded_embed_metadata_keys?: Array<string>
excluded_llm_metadata_keys?: Array<string>
page_positions?: Array<number> | null

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

TextNode { class_name, embedding, end_char_idx, 11 more }

Provided for backward compatibility.

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

class_name?: string
embedding?: Array<number> | null

Embedding of the node.

end_char_idx?: number | null

End char index of the node.

excluded_embed_metadata_keys?: Array<string>

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

excluded_llm_metadata_keys?: Array<string>

Metadata keys that are excluded from text for the LLM.

extra_info?: Record<string, unknown>

A flat dictionary of metadata fields

id_?: string

Unique ID of the node.

metadata_seperator?: string

Separator between metadata fields when converting to string.

metadata_template?: string

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

mimetype?: string

MIME type of the node content.

relationships?: Record<string, RelatedNodeInfo { node_id, class_name, hash, 2 more } | Array<UnionMember1>>

A mapping of relationships to other node information.

Accepts one of the following:
RelatedNodeInfo { node_id, class_name, hash, 2 more }
node_id: string
class_name?: string
hash?: string | null
metadata?: Record<string, unknown>
node_type?: "1" | "2" | "3" | 2 more | (string & {}) | null
Accepts one of the following:
"1" | "2" | "3" | 2 more
"1"
"2"
"3"
"4"
"5"
(string & {})
Array<UnionMember1>
node_id: string
class_name?: string
hash?: string | null
metadata?: Record<string, unknown>
node_type?: "1" | "2" | "3" | 2 more | (string & {}) | null
Accepts one of the following:
"1" | "2" | "3" | 2 more
"1"
"2"
"3"
"4"
"5"
(string & {})
start_char_idx?: number | null

Start char index of the node.

text?: string

Text content of the node.

text_template?: string

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