Create a document by uploading a file. Supports common document formats (PDF, TXT, DOCX, etc.). Processing is asynchronous — use the returned batch ID with Get Document Indexing Status to track progress.
Documentation Index
Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
Use this file to discover all available pages before exploring further.
API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer . Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.
Knowledge base ID.
File to upload.
JSON string containing configuration. Accepts the same fields as Create Document by Text (indexing_technique, doc_form, doc_language, process_rule, retrieval_model, embedding_model, embedding_model_provider) except name and text.
"{\"indexing_technique\":\"high_quality\",\"doc_form\":\"text_model\",\"doc_language\":\"English\",\"process_rule\":{\"mode\":\"automatic\"}}"