DocubixDocs
Dashboard

Quick Start

Get your first answer in about 5 minutes.

Dashboard steps require the X-Clerk-User-Id header. Public chat uses an API key in the JSON body.

Step 1 — Create a knowledge base

POST/kbs
curl
curl -X POST https://api.docubix.com/kbs \
  -H "Content-Type: application/json" \
  -H "X-Clerk-User-Id: your_clerk_user_id" \
  -d '{"name": "Biology Tutor"}'
json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Biology Tutor",
  "status": "active"
}

Step 2 — Upload a document

POST/kbs/{kb_id}/documents
curl
curl -X POST https://api.docubix.com/kbs/{kb_id}/documents \
  -H "X-Clerk-User-Id: your_clerk_user_id" \
  -F "file=@biology.pdf"

Processing runs asynchronously. Poll document status until it reaches completed.

Step 3 — Create an API key

POST/kbs/{kb_id}/api-keys
curl
curl -X POST https://api.docubix.com/kbs/{kb_id}/api-keys \
  -H "Content-Type: application/json" \
  -H "X-Clerk-User-Id: your_clerk_user_id" \
  -d '{"name": "Production"}'

Save the api_key from the response — it is only shown once.

Step 4 — Ask a question

POST/chat
curl
curl -X POST https://api.docubix.com/chat \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "rag_live_your_api_key_here",
    "message": "What is ATP?"
  }'

Pass the conversation_id from the response on follow-up messages to continue the same chat.

Result

json
{
  "conversation_id": "550e8400-e29b-41d4-a716-446655440000",
  "answer": "ATP is adenosine triphosphate...",
  "sources": [
    {
      "document": "biology.pdf",
      "chunk_id": "abc123",
      "score": 0.92,
      "page": 12
    }
  ],
  "usage": {
    "input_tokens": 1200,
    "output_tokens": 85
  },
  "metadata": {
    "retrieved_chunks": 3,
    "retrieval_score": 0.92,
    "model": "gpt-5.2"
  }
}