Skip to main content
POST
/
knowledge-bases
Create Knowledge Base
curl --request POST \
  --url https://api.truedy.ai/api/public/v1/knowledge-bases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Product FAQ",
  "description": "Frequently asked questions about our products",
  "file_content": "Q: How do I reset my password?\nA: Click on Forgot Password on the login page..."
}
'
{
  "data": {
    "id": "kb_x9y8z7w6",
    "name": "Product FAQ",
    "description": "Frequently asked questions about our product line",
    "status": "processing",
    "source_count": 0,
    "chunk_count": 0,
    "embedding_model": "text-embedding-3-small",
    "created_at": "2026-03-01T09:00:00Z",
    "updated_at": "2026-04-04T18:00:00Z"
  },
  "meta": {
    "request_id": "req_32e7531c",
    "ts": "2026-04-05T10:22:00Z"
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header: Bearer <your_api_key>

Body

application/json
name
string
required

Name for the knowledge base

Required string length: 1 - 255
Example:

"Product Documentation"

description
string | null

Optional description

Maximum string length: 1000
Example:

"Complete product manual and FAQs"

file_content
string | null

Text content or base64-encoded file

Example:

"Product Overview..."

file_name
string | null

File name if uploading a file

Example:

"manual.pdf"

Response

Knowledge base created successfully

data
object
required
meta
object
required