This guide takes you from an empty account to answering questions over your own content in about five minutes. You'll create a knowledge base, add a document, wait for it to be indexed, and run a semantic search, all through the Kognita API.

Before you start
You'll need two things from your dashboard:
- An API key (Settings → API Keys → Create)
- Your Organization ID (shown in Settings)
Every request authenticates with these two headers:
-H "Authorization: Bearer $KOGNITA_API_KEY" \
-H "X-Kognita-Organization-Id: $KOGNITA_ORG_ID"
Export them once so the rest of the commands stay short:
export KOGNITA_API_KEY="sk_..."
export KOGNITA_ORG_ID="org_..."
export KOGNITA_API="https://api.kognita.com/api"
Step 1: Create a knowledge base
A knowledge base is the container for your content. It carries a configuration specifying which embedding model to use and how to chunk text, but the defaults are sensible, so you can create one with just a name.
curl -X POST "$KOGNITA_API/knowledge-bases" \
-H "Authorization: Bearer $KOGNITA_API_KEY" \
-H "X-Kognita-Organization-Id: $KOGNITA_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"name": "Product Docs"}'
The response includes the knowledge base ID, which looks like kb_a1b2c3d4e5f6g7h8. Save it:
export KB_ID="kb_a1b2c3d4e5f6g7h8"
Step 2: Add a document
Now add some content. Kognita handles chunking and embedding for you; you just send the text.
curl -X POST "$KOGNITA_API/knowledge-bases/$KB_ID/content" \
-H "Authorization: Bearer $KOGNITA_API_KEY" \
-H "X-Kognita-Organization-Id: $KOGNITA_ORG_ID" \
-H "Content-Type: application/json" \
-d '{
"title": "Refund Policy",
"body": "Customers may request a full refund within 30 days of purchase. Refunds are processed to the original payment method within 5 business days. Digital goods are non-refundable once downloaded."
}'
The response returns a content ID (cnt_...) and a status of PENDING. Behind the scenes, your document is now queued: it gets chunked, each chunk is embedded, and the vectors are written to your knowledge base.
Step 3: Wait for indexing
Ingestion is asynchronous. Poll the content until its status flips to READY:
curl "$KOGNITA_API/knowledge-bases/$KB_ID/content/$CONTENT_ID" \
-H "Authorization: Bearer $KOGNITA_API_KEY" \
-H "X-Kognita-Organization-Id: $KOGNITA_ORG_ID"
{ "id": "cnt_...", "title": "Refund Policy", "status": "READY" }
For a single short document this takes a second or two. Larger documents take longer since every chunk is embedded independently.
Step 4: Run your first search
Now the payoff. Ask a question in natural language. Note that none of these words need to appear in the document:
curl -X POST "$KOGNITA_API/knowledge-bases/$KB_ID/search/hybrid" \
-H "Authorization: Bearer $KOGNITA_API_KEY" \
-H "X-Kognita-Organization-Id: $KOGNITA_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"query": "how long do I have to get my money back?", "limit": 3}'
You'll get back the matching chunk, ranked by relevance, with a score and a link to the source content:
{
"results": [
{
"content_id": "cnt_...",
"text": "Customers may request a full refund within 30 days of purchase...",
"score": 0.89
}
]
}
The query said "money back"; the document said "refund." Semantic search bridged the gap without any keyword overlap.
What just happened
In four calls you built a working retrieval system:
- Created a knowledge base with default embedding + chunking config.
- Added content, which Kognita chunked and embedded automatically.
- Waited for asynchronous indexing to finish.
- Searched in plain language and got back the relevant passage.
Where to go next
- Feed the results to an LLM. Take the returned chunks, drop them into a prompt, and you have a grounded question-answering bot, which is RAG.
- Tune the search. The hybrid endpoint takes an
alphaparameter to bias toward keyword vs. semantic matching. - Automate ingestion. Connect a source like Notion so content syncs continuously instead of being posted by hand.
- Expose it to your AI tools. Publish the knowledge base as an MCP server so Claude, Cursor, or your own agent can search it directly.
Five minutes in, you have the foundation. Everything else is refinement.