Skip to main content
POST
/
knowledge-base
Create Knowledge Base
curl --request POST \
  --url https://api.cozmox.ai/knowledge-base \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider": "trieve",
  "name": "<string>",
  "searchPlan": {
    "searchType": "fulltext",
    "topK": 123,
    "removeStopWords": true,
    "scoreThreshold": 123
  },
  "createPlan": {
    "type": "import",
    "providerId": "<string>"
  }
}
'
{
  "provider": "trieve",
  "id": "<string>",
  "orgId": "<string>",
  "name": "<string>",
  "searchPlan": {
    "searchType": "fulltext",
    "topK": 123,
    "removeStopWords": true,
    "scoreThreshold": 123
  },
  "createPlan": {
    "type": "import",
    "providerId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Retrieve your API Key from Dashboard.

Body

application/json
  • TrieveKnowledgeBaseDTO
  • CustomKnowledgeBaseDTO
provider
enum<string>
required

This knowledge base is provided by Trieve.

To learn more about Trieve, visit https://trieve.ai.

Available options:
trieve
name
string

This is the name of the knowledge base.

searchPlan
object

This is the searching plan used when searching for relevant chunks from the vector store.

You should configure this if you're running into these issues:

  • Too much unnecessary context is being fed as knowledge base context.
  • Not enough relevant context is being fed as knowledge base context.
createPlan
Import · object

This is the plan if you want us to create/import a new vector store using Trieve.

Response

201 - application/json
  • TrieveKnowledgeBase
  • CustomKnowledgeBase
provider
enum<string>
required

This knowledge base is provided by Trieve.

To learn more about Trieve, visit https://trieve.ai.

Available options:
trieve
id
string
required

This is the id of the knowledge base.

orgId
string
required

This is the org id of the knowledge base.

name
string

This is the name of the knowledge base.

searchPlan
object

This is the searching plan used when searching for relevant chunks from the vector store.

You should configure this if you're running into these issues:

  • Too much unnecessary context is being fed as knowledge base context.
  • Not enough relevant context is being fed as knowledge base context.
createPlan
Import · object

This is the plan if you want us to create/import a new vector store using Trieve.