Skip to main content
POST
Create an Empty Knowledge Base

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).

Body

application/json
name
string
required

Name of the knowledge base.

Required string length: 1 - 40
description
string
default:""

Description of the knowledge base.

Maximum string length: 400
embedding_model
string

Embedding model name. Use the model field from Get Available Models with model_type=text-embedding.

embedding_model_provider
string

Embedding model provider identifier, formatted as organization/plugin_name/provider_name (e.g. langgenius/openai/openai). A bare name like openai expands to langgenius/<name>/<name> and works only for langgenius-published plugins.

Get valid values from the provider field of Get Available Models with model_type=text-embedding.

external_knowledge_api_id
string

ID of the external knowledge API connection.

external_knowledge_id
string

ID of the external knowledge base.

indexing_technique
enum<string> | null

high_quality uses embedding models for precise search; economy uses keyword-based indexing.

Available options:
high_quality,
economy
permission
enum<string>
default:only_me

Controls who can access this knowledge base. only_me restricts to the creator, all_team_members grants access to the entire workspace, partial_members grants access to specified members.

Available options:
only_me,
all_team_members,
partial_members
provider
enum<string>
default:vendor

vendor for internal knowledge base, external for external knowledge base.

Available options:
vendor,
external
retrieval_model
object

Retrieval model configuration. Controls how chunks are searched and ranked when querying this knowledge base.

summary_index_setting
object | null

Summary index configuration.

Response

Knowledge base created successfully.

app_count
integer

Number of applications currently using this knowledge base.

author_name
string

Display name of the creator.

built_in_field_enabled
boolean

Whether built-in metadata fields (e.g., document_name, uploader) are enabled.

chunk_structure
string | null

Chunk structure configuration.

created_at
number

Creation timestamp (Unix epoch in seconds).

created_by
string

ID of the user who created the knowledge base.

data_source_type
string

Data source type of the documents, null if not yet configured.

description
string

Optional text describing the purpose or contents of the knowledge base.

doc_form
string

Document chunking mode. text_model for standard text chunking, hierarchical_model for parent-child structure, qa_model for QA pair extraction.

doc_metadata
object[]

Metadata field definitions for the knowledge base.

document_count
integer

Total number of documents in the knowledge base.

embedding_available
boolean

Whether the configured embedding model is currently available.

embedding_model
string

Name of the embedding model used for indexing.

embedding_model_provider
string

Embedding model provider identifier, formatted as organization/plugin_name/provider_name (e.g. langgenius/openai/openai). Legacy knowledge bases may return the bare short form (e.g. openai).

enable_api
boolean

Whether API access is enabled for this knowledge base.

external_knowledge_info
object | null

Connection details for external knowledge bases. Present when provider is external.

external_retrieval_model
object | null

Retrieval settings for external knowledge bases. null for internal knowledge bases.

icon_info
object | null

Icon display configuration for the knowledge base.

id
string

Unique identifier of the knowledge base.

indexing_technique
string

high_quality uses embedding models for precise search; economy uses keyword-based indexing.

is_multimodal
boolean

Whether multimodal content processing is enabled.

is_published
boolean

Whether the knowledge base is published.

maintainer
string | null

Display name of the knowledge base maintainer. null if not set.

name
string

Display name of the knowledge base. Unique within the workspace.

partial_member_list
string[] | null

Account IDs of members granted access when permission is partial_members. Always present on the update response; on the detail response, present only when permission is partial_members.

permission
string

Controls who can access this knowledge base. Possible values: only_me, all_team_members, partial_members.

pipeline_id
string | null

Pipeline ID, if a custom processing pipeline is configured.

provider
string

Provider type. vendor for internally managed, external for external knowledge base connections.

retrieval_model_dict
object

Retrieval configuration for the knowledge base.

runtime_mode
string | null

Runtime processing mode.

summary_index_setting
object | null

Summary index configuration.

tags
object[]

Tags associated with this knowledge base.

total_available_documents
integer

Number of documents that are enabled and available.

total_documents
integer

Total number of documents.

updated_at
number

Last update timestamp (Unix epoch in seconds).

updated_by
string

ID of the user who last updated the knowledge base.

word_count
integer

Total word count across all documents.

Last modified on September 8, 2026