Create an Empty Knowledge Base
Changed onCreates an empty knowledge base. Add documents to it with Create Document by Text or Create Document by File.
Request
- Base URLhttps://api.dify.ai/v1
- URLhttps://api.dify.ai/v1/datasets
- AuthHTTP bearer
Request body
Description of the knowledge base.
Embedding model name. Use the model field from Get Available Models with model_type=text-embedding.
Embedding model provider identifier, formatted as organization/plugin_name/provider_name (e.g. langgenius/openai/openai). A bare name like openai expands to langgenius/<name>/<name> and works only for langgenius-published plugins.
Get valid values from the provider field of Get Available Models with model_type=text-embedding.
ID of the external knowledge API connection.
ID of the external knowledge base.
high_quality uses embedding models for precise search; economy uses keyword-based indexing.
Name of the knowledge base.
Controls who can access this knowledge base. only_me restricts to the creator, all_team_members grants access to the entire workspace, partial_members grants access to specified members.
vendor for internal knowledge base, external for external knowledge base.
Response
Knowledge base created successfully.
Number of applications currently using this knowledge base.
Display name of the creator.
Whether built-in metadata fields (e.g., document_name, uploader) are enabled.
Chunk structure configuration.
Creation timestamp (Unix epoch in seconds).
ID of the user who created the knowledge base.
Data source type of the documents, null if not yet configured.
Optional text describing the purpose or contents of the knowledge base.
Document chunking mode. text_model for standard text chunking, hierarchical_model for parent-child structure, qa_model for QA pair extraction.
Total number of documents in the knowledge base.
Whether the configured embedding model is currently available.
Name of the embedding model used for indexing.
Embedding model provider identifier, formatted as organization/plugin_name/provider_name (e.g. langgenius/openai/openai). Legacy knowledge bases may return the bare short form (e.g. openai).
Whether API access is enabled for this knowledge base.
Unique identifier of the knowledge base.
high_quality uses embedding models for precise search; economy uses keyword-based indexing.
Whether multimodal content processing is enabled.
Whether the knowledge base is published.
Display name of the knowledge base maintainer. null if not set.
Display name of the knowledge base. Unique within the workspace.
Account IDs of members granted access when permission is partial_members. Always present on the update response; on the detail response, present only when permission is partial_members.
Controls who can access this knowledge base. Possible values: only_me, all_team_members, partial_members.
Pipeline ID, if a custom processing pipeline is configured.
Provider type. vendor for internally managed, external for external knowledge base connections.
Runtime processing mode.
Number of documents that are enabled and available.
Total number of documents.
Last update timestamp (Unix epoch in seconds).
ID of the user who last updated the knowledge base.
Total word count across all documents.
Changes
- info
added the non-success response with the status
- info