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.
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\"}}"