Skip to main content
PATCH

Authorizations

Authorization
string
header
required

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path Parameters

knowledge_base_id
string<uuid>
required

Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.

Body

application/json

Get Knowledge Base Settings answers in snake_case and this body is camelCase, so its response cannot be sent back unchanged.

Optional fields marked nullable treat null as omitted.

The normalized request must fit within 65,536 UTF-8 bytes. See Request Size Limits.

embedding
object
required

The embedding model used to index content. Once a model is active, changing it starts a migration that re-embeds every document.

Find the values with Get Available Models: text-embedding for embedding models, llm for the reasoning model, rerank for rerank models.

pluginId is the plugin's organization/plugin_name, provider its provider name, model the model name.

Get Available Models returns one provider string shaped organization/plugin_name/provider_name, so langgenius/openai/openai splits into pluginId langgenius/openai and provider openai. A bare openai stands for langgenius/openai/openai.

expectedRevision
integer
required

The current revision from Get Knowledge Base Settings. A stale value answers 409 and nothing changes.

Required range: x >= 1
retrieval
object | null

The retrieval settings a query uses: reasoning model, rerank model, score threshold, topK, and the depth to fall back on.

Response

No migration started: the settings were stored as pending, or models are active and the change needed no migration. settings has the same shape as Get Knowledge Base Settings, and its revision is the value to send on the next update. While the settings are pending, active_profile_available stays false and capabilities.query stays false.

migration
object | null

Always null here: no migration started.

settings
object