Maintain Knowledge Base via API
Authentication and invocation methods are consistent with the application Service API. The difference is that a single dataset API token can operate on all datasets.
Advantages of Using Dataset API
Synchronize your data system with Dify datasets to create powerful workflows.
Provide dataset list, document list, and detail queries to facilitate building your own data management page.
Support both plain text and file uploads and updates for documents, and support batch addition and modification at the segment level to streamline your synchronization process.
Reduce the time spent on manual document processing and synchronization, enhancing your visibility into Dify's software and services.
How to Use
Navigate to the dataset page, and you can switch to the API page from the left navigation. On this page, you can view the dataset API documentation provided by Dify and manage the credentials for accessing the dataset API in API Keys.
API Call Examples
Create an Empty Dataset
Only used to create an empty dataset
Dataset List
Create Document by Text
Create Document by File
Get Document Embedding Status (Progress)
Delete Document
Dataset Document List
Add Segments
Error Messages
document_indexing
: Document indexing failedprovider_not_initialize
: Embedding model not configurednot_found
: Document not founddataset_name_duplicate
: Dataset name duplicateprovider_quota_exceeded
: Model quota exceededdataset_not_initialized
: Dataset not initializedunsupported_file_type
: Unsupported file typeCurrently supported: txt, markdown, md, pdf, html, htm, xlsx, docx, csv
too_many_files
: Too many files, currently only single file uploads are supportedfile_too_large
: File too large, supports files under 15MB
Last updated