Core resources
Knowledge bases
Give assistants retrieval over your documents and websites. Add sources, then attach a Query tool over them to an assistant. The agent calls the Query tool during calls to fetch grounded answers.
GET
/knowledge-bases knowledge:readList knowledge bases
List knowledge bases.
bash
curl https://api.bolchoai.in/v1/knowledge-bases -H "Authorization: Bearer $BOLCHO_API_KEY"POST
/knowledge-bases knowledge:writeCreate knowledge base
Create an empty knowledge base.
Body
| name* | string | Name. |
bash
curl -X POST https://api.bolchoai.in/v1/knowledge-bases \
-H "Authorization: Bearer $BOLCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'GET
/knowledge-bases/{id}/documents knowledge:readList documents
The documents and websites in a knowledge base, with their ingestion status.
Path parameters
| id* | uuid | Knowledge base id. |
bash
curl https://api.bolchoai.in/v1/knowledge-bases/$ID/documents \
-H "Authorization: Bearer $BOLCHO_API_KEY"Response
json
[ { "id": "…", "title": "shipping.pdf", "type": "pdf", "status": "ready", "chunkCount": 42, "sizeBytes": 91234 } ]POST
/knowledge-bases/{id}/documents knowledge:writeAdd a document
Upload/ingest a document (chunked + embedded for retrieval).
Path parameters
| id* | uuid | Knowledge base id. |
Body
Send as multipart/form-data with the file in the file field.
bash
curl -X POST https://api.bolchoai.in/v1/knowledge-bases/$ID/documents \
-H "Authorization: Bearer $BOLCHO_API_KEY" \
-F "file=@/path/to/file"POST
/knowledge-bases/{id}/websites knowledge:writeAdd a website
Crawl & ingest a website URL.
Path parameters
| id* | uuid | Knowledge base id. |
Body
| url* | string | Website URL to crawl. |
bash
curl -X POST https://api.bolchoai.in/v1/knowledge-bases/$ID/websites \
-H "Authorization: Bearer $BOLCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "string"
}'POST
/knowledge-bases/{id}/search knowledge:readSemantic search
Vector search the base — useful to test retrieval quality.
Path parameters
| id* | uuid | Knowledge base id. |
Query parameters
| topK | number | Results to return (default 5). |
Body
| query* | string | Search query. |
bash
curl -X POST https://api.bolchoai.in/v1/knowledge-bases/$ID/search \
-H "Authorization: Bearer $BOLCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "string"
}'