Documentation
API Reference

Knowledge API

Search facts and update documents in your knowledge base.

Search knowledge#

Perform a real-time, relevant search across your files and website crawling indexes:

POST/v1/knowledge/search

Request

BASH
curl -X POST \
  -H "Authorization: Bearer tc_live_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "refund policy details"
  }' \
  https://api.trained.chat/v1/knowledge/search

Response

JSON
{
  "query": "refund policy details",
  "results": [
    {
      "text": "Refunds are processed within 5-10 business days...",
      "source": "billing-faq.md",
      "relevance_score": 0.945
    }
  ]
}