> For the complete documentation index, see [llms.txt](https://api.docs.blockbrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.docs.blockbrain.ai/getting-started/knowledge-management/create-a-database.md).

# Create a Database

[Document Databases](/concepts/knowledge-base.md) store and serve the source materials that knowledge workflows rely on: files, email contents, and structured documents. In this stack, documents are linked to conversations (data rooms) and Insights via short-lived references, enabling retrieval, processing, and indexing while preserving provenance and access controls.

**Each database can have:**

* **Folders**: Can be used for organization by project, topic, or knowledge domain. Fine-granular access can be provided to specific users.
* **Documents**: Main entities of different types like PDFs, Word/Office docs, emails, spreadsheets, structured JSON/XML, images that will be indexed, chunked and vectorized for RAG.
  * Documents can be uploaded manually, by API or imported through the provided web crawler.&#x20;

## Create a new Knowledgebase / Database

## POST /knowledge\_base

> Create Knowledgebase

```json
{"openapi":"3.1.0","info":{"title":"Blockbrain Knowledge Bots","version":"0.2.6"},"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"KnowledgeBaseCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_public":{"type":"boolean","title":"Is Public","default":false},"embeddingModel":{"$ref":"#/components/schemas/EmbeddingModel","default":"azure-ada-002"},"chunkSize":{"anyOf":[{"type":"integer","maximum":30000,"minimum":0},{"type":"null"}],"title":"Chunksize","default":1200},"chunkOverlap":{"anyOf":[{"type":"integer","maximum":12000,"minimum":0},{"type":"null"}],"title":"Chunkoverlap","default":200},"markedLanguages":{"items":{"type":"string"},"type":"array","maxItems":3,"title":"Markedlanguages","default":[]},"enableExtractTable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableextracttable","default":false},"enableExtractImage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableextractimage","default":true},"enableConvertImage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableconvertimage","default":false},"useContextualChunking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Usecontextualchunking","default":false},"enableMultiplePdfPagesPerChunk":{"type":"boolean","title":"Enablemultiplepdfpagesperchunk","default":false}},"type":"object","required":["name","description"],"title":"KnowledgeBaseCreate"},"EmbeddingModel":{"type":"string","enum":["azure-ada-002","azure-emb-3-large","openai-ada-002","openai-emb-3-small","openai-emb-3-large","sagemaker-bge","vertex-ai-embedding-english-text-4","vertex-ai-embedding-multilingual-text-2","gemini-embedding-001"],"title":"EmbeddingModel"},"CommonResponseDTO":{"properties":{"code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"CommonResponseDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/knowledge_base":{"post":{"tags":["knowledge_base"],"summary":"Create Knowledgebase","operationId":"create_knowledgebase_knowledge_base_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommonResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

The response contains a `body` property that contains the `_id` of the created Knowledgebase. This id will can be used for altering the DB, creating folders and uploading documents.

## Next Step

Now that you have created a Knowledgebase, you can [Create Folders](/getting-started/knowledge-management/create-a-database/create-folders.md) and [Upload Documents to DBs](/getting-started/knowledge-management/upload-documents-to-dbs.md).

## Supported File-Types

Every standard file-type is already being supported by our indexing and vectorization pipelines. Still, we are constantly adding more compatibility.

<figure><img src="/files/AMxP88DudmYKBgPttnEm" alt="" width="172"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.docs.blockbrain.ai/getting-started/knowledge-management/create-a-database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
