Getting started
Quick start
In this guide you will create a knowledge base, ingest a piece of text, and run your first search, all in under 5 minutes.
Before you begin
- 1. Log in to the consoleSign in at kognita.ai/api-keys. If this is your first time, an organization is created automatically on sign-in.
- 2. Create an API keyOn the API Keys page, click Create key, give it a name, and copy the key value. It is shown only once, so store it somewhere safe.
- 3. Copy your Organization IDYour Organization ID is shown at the top of the API Keys page next to your API keys. It looks like
org_xxxxxxxxxxxxxxxxxxxx.
1
Create a knowledge base
A knowledge base is the top-level boundary for your content. You can create one from the console or directly via the API.
2
Add content
Push text into the knowledge base. Kognita processes and embeds it in the background; it will be searchable within seconds.
3
Search
Run a hydrid search to retrieve relevant chunks. The response includes a relevance score for each result.
bash
curl -X POST https://api.kognita.ai/api/v1/knowledge-bases/{kbId}/search/hybrid \
-H "x-kognita-api-key: YOUR_API_KEY" \
-H "x-kognita-organization-id: YOUR_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"query": "what is kognita", "limit": 5}'Response
{
"success": true,
"data": [
{
"id": "chunk_001",
"contentChunk": "Kognita is a managed knowledge-base API for AI applications.",
"score": 0.94
}
]
}