v4

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-13216144508.7 KB
kb

Save Collection Config

Save ingestion configuration for a specific collection.

post/api/kb/collections/{collection}/config

Path parameters

collectionstring required

Request body

deepdoc_processing_modestring nullable

DeepDoc processing mode (e.g., 'pipeline', 'default').

deepdoc_parallel_threadsinteger nullable

DeepDoc parallel threads (DEEPDOC_PARALLEL_THREADS).

deepdoc_reserve_cpuinteger nullable

DeepDoc reserved CPU cores (DEEPDOC_RESERVE_CPU).

deepdoc_limiter_capacityinteger nullable

DeepDoc CapacityLimiter capacity (DEEPDOC_LIMITER_CAPACITY).

deepdoc_pipeline_monitorboolean nullable

Enable DeepDoc pipeline monitor (DEEPDOC_PIPELINE_MONITOR).

deepdoc_pipeline_s1_workersinteger nullable

DeepDoc S1 worker count (DEEPDOC_PIPELINE_S1_WORKERS).

deepdoc_gpu_sessionsinteger nullable

DeepDoc GPU sessions count/preference (DEEPDOC_GPU_SESSIONS).

embedding_base_urlstring nullable

Override DashScope base URL for embedding requests.

embedding_api_keystring nullable

Override DashScope API key for embedding requests.

embedding_timeout_secnumber nullable

Override embedding request timeout (seconds).

rerank_model_idstring nullable

Bound rerank model ID for this collection (user-scoped).

parse_method'default' | 'pypdf' | 'pdfplumber' | 'unstructured' | 'pymupdf' | 'deepdoc'

Available parsing methods

chunk_strategy'recursive' | 'fixed_size' | 'markdown'

Available chunk strategies

chunk_methodstring nullable

Custom chunk method identifier. If provided, takes precedence over chunk_strategy

chunk_sizeinteger nullable

Chunk size passed to chunk_document; must be a positive integer. If None, semantic splitting is used without size limits.

chunk_overlapinteger

Chunk overlap passed to chunk_document; must be non-negative

separatorsstring[] nullable

Custom separators for recursive/markdown strategies

use_token_countboolean

If True, chunk_size and chunk_overlap are in tokens (tiktoken); only applies to RECURSIVE strategy

tiktoken_encodingstring

tiktoken encoding name when use_token_count=True (e.g. cl100k_base for GPT-4/3.5). Should align with config.DEFAULT_TIKTOKEN_ENCODING.

enable_protected_contentboolean

If True, do not split inside code blocks, formulas, tables (P1).

protected_patternsstring[] nullable

Optional regex patterns for protected regions; None uses config default.

table_context_sizeinteger

Chars from prev/next chunk to attach to table chunks; 0 = off (P2).

image_context_sizeinteger

Chars from prev/next chunk to attach to image chunks; 0 = off (P2).

embedding_model_idstring nullable

Embedding model identifier registered in AgentOS model hub. If omitted, the pipeline attempts to auto-detect a single available embedding model.

collection_lockedboolean

Whether to lock collection configuration. When True, enforces strict config validation.

allow_mixed_parse_methodsboolean

Whether to allow mixed parse methods within the collection. When False, enforces type-based parse method consistency.

skip_config_validationboolean

Skip collection configuration validation. Use with caution.

embedding_batch_sizeinteger

Batch size for embedding provider requests; must be positive

embedding_concurrentinteger

Maximum concurrent requests for embedding computation when using async mode (for models that don't support batch processing, e.g., text-embedding-v4). Must be positive. Adjust based on machine configuration and API rate limits.

embedding_use_asyncboolean

Whether to use async concurrent processing for embeddings. Set to True for models that don't support batch processing (e.g., text-embedding-v4). When True, embeddings are processed concurrently using asyncio instead of batch API calls.

max_retriesinteger

Maximum number of retries for embedding provider failures; must be non-negative

retry_delaynumber

Delay in seconds between embedding retries; must be non-negative

Response

Successful Response

statusstring required

Operation status: success|partial_success|error

collectionstring required

Collection identifier affected by the operation

messagestring required

Human-readable summary of the collection operation

warningsstring[]

Non-fatal issues encountered while processing the collection

deleted_countsobject

Aggregated deletion counts per table when applicable