Create a document from raw text content. The document is processed asynchronously — 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.
Document name.
Document text content.
Required when adding the first document to a knowledge base. Subsequent documents inherit the knowledge base's indexing technique if omitted. high_quality uses embedding models for precise search; economy uses keyword-based indexing.
high_quality, economy text_model for standard text chunking, hierarchical_model for parent-child chunk structure, qa_model for question-answer pair extraction.
text_model, hierarchical_model, qa_model Language of the document for processing optimization.
Processing rules for chunking.
Retrieval model configuration. Controls how chunks are searched and ranked when querying this knowledge base.
Embedding model name. Use the model field from Get Available Models with model_type=text-embedding.
Embedding model provider. Use the provider field from Get Available Models with model_type=text-embedding.
Original document ID for versioning.