Skip to main content
POST
Create Knowledge Base

Body

application/json

Request body for creating a new knowledge base.

name
string
required

The name of the knowledge base. Should be unique within your organization and clearly identify its purpose.

Minimum string length: 1
description
string
required

A description of the knowledge base explaining its contents and purpose. AI agents read this to decide when the knowledge base is relevant.

document_language
string
default:en

Primary language of the material in this knowledge base. Deliberately a free-form string rather than an enum: an unrecognised value is accepted and stored rather than rejected.

chunking_strategy
enum<string>
default:recursive

How source material is split before embedding. Applied at index time, so it affects material ingested after it is set.

Available options:
fixed_size,
semantic,
sentence,
paragraph,
recursive
vector_backend
enum<string>
default:pinecone

Vector database backing this knowledge base's index.

Available options:
pinecone,
qdrant,
weaviate,
milvus,
pgvector
embedding_model
enum<string>
default:text-embedding-3-large

Embedding model used to vectorise chunks. Immutable: it is accepted here and never on update, because changing it would invalidate every vector already stored. Pick it up front.

Available options:
text-embedding-3-small,
text-embedding-3-large
chunk_size
integer
default:512

Target chunk size. Applied at index time; nothing already indexed is re-chunked.

Required range: 100 <= x <= 4096
chunk_overlap
integer
default:50

Overlap between consecutive chunks. Applied at index time.

Required range: 0 <= x <= 500
assistant_persona
string | null

A noun phrase rather than a sentence, describing how an assistant built on this knowledge base introduces itself - for example 'a customer-care voice assistant for Acme Bank'. Defaults to a value derived from the name, capped at 280 characters. Treated as identity-and-tone data in the user message, never as system instructions. It affects only answer generation, a capability this reference does not document, so no endpoint documented here is affected by setting it.

Maximum string length: 280

Response

Knowledge base created.

Response model for a knowledge base.

id
string
required

Unique identifier of the knowledge base.

name
string
required

The name of the knowledge base.

created_at
string<date-time>
required

UTC timestamp indicating when this knowledge base was created.

updated_at
string<date-time>
required

UTC timestamp indicating when this knowledge base was last modified.

description
string | null

Description of the knowledge base's purpose and contents.

document_language
string
default:en

Primary language of the material in this knowledge base.

document_count
integer
default:0

Number of documents stored in this knowledge base.

chunking_strategy
enum<string>
default:recursive

Chunking strategy currently in effect for new material.

Available options:
fixed_size,
semantic,
sentence,
paragraph,
recursive
vector_backend
enum<string>
default:pinecone

Vector database backing this knowledge base's index.

Available options:
pinecone,
qdrant,
weaviate,
milvus,
pgvector
embedding_model
enum<string>
default:text-embedding-3-small

Embedding model in use. Note the asymmetry with the create request, which defaults to text-embedding-3-large: this schema's default is text-embedding-3-small because knowledge bases created before the field existed are on small. Read the value off the response rather than assuming it.

Available options:
text-embedding-3-small,
text-embedding-3-large
chunk_size
integer
default:512

Target chunk size for new material.

chunk_overlap
integer
default:50

Overlap between consecutive chunks.

assistant_persona
string | null

How an assistant built on this knowledge base introduces itself.

status
enum<string> | null

Aggregate processing state of the knowledge base's documents.

Available options:
processing,
completed,
failed
workspace_id
string | null

Workspace this knowledge base belongs to.

organization_id
string | null

Organization this knowledge base belongs to, resolved from your token.

user_id
string | null

User this knowledge base belongs to, resolved from your token.