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.

  1. 1. Go to Knowledge Bases → New.
  2. 2. For the name, use My First KB or anything you like.
  3. 3. Leave the type as the default (Text — cost efficient) and click Create Knowledge Base.
  4. 4. Copy the knowledge base ID from the URL; you will need it in the next steps.
2

Add content

Push text into the knowledge base. Kognita processes and embeds it in the background; it will be searchable within seconds.

  1. 1. Open your knowledge base and go to Content → Add Content.
  2. 2. Select Manual input, then paste or type your text into the field.
  3. 3. Optionally add metadata key/value pairs to tag this item for later filtering.
  4. 4. Click Add Content. Kognita processes it in the background.
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
    }
  ]
}