Skip to main content
POST
/
api
/
chat
Chat Endpoint
curl --request POST \
  --url https://api.example.com/api/chat \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "conversation_id": "<string>",
  "namespace": "All",
  "use_query_expansion": true
}
'
{
  "answer": "<string>",
  "answer_origin": "library_rag",
  "conversation_id": "<string>",
  "question_type": "content",
  "sources": [
    {
      "namespace": "<string>",
      "preview": "<string>",
      "source_type": "youtube",
      "title": "<string>",
      "url": "<string>",
      "file_path": "<string>",
      "full_text": "<string>",
      "rerank_score": 123,
      "source_id": "<string>",
      "timestamp": 1,
      "video_id": "<string>"
    }
  ],
  "model_name": "<string>",
  "provenance_note": "<string>",
  "provider": "<string>",
  "reranker_available": true,
  "suggested_sources": [
    {
      "namespace": "<string>",
      "preview": "<string>",
      "source_type": "youtube",
      "title": "<string>",
      "url": "<string>",
      "file_path": "<string>",
      "full_text": "<string>",
      "rerank_score": 123,
      "source_id": "<string>",
      "timestamp": 1,
      "video_id": "<string>"
    }
  ],
  "timing": {
    "llm_ms": 0,
    "rerank_ms": 0,
    "search_ms": 0,
    "total_ms": 0
  },
  "videos_for_selection": [
    {
      "namespace": "<string>",
      "title": "<string>",
      "video_id": "<string>"
    }
  ]
}

Body

application/json

Request to send a chat message.

message
string
required
Required string length: 1 - 5000
conversation_id
string | null
Maximum string length: 100
namespace
string
default:All
Maximum string length: 100
use_query_expansion
boolean
default:true

Response

Successful Response

Response from chat endpoint.

answer
string
required
answer_origin
enum<string>
required
Available options:
library_rag,
web_rag,
policy,
general,
skill
conversation_id
string
required
question_type
enum<string>
required
Available options:
content,
clear_meta,
ambiguous,
video_select,
general,
skill
sources
Source · object[]
required
model_name
string | null
provenance_note
string | null
provider
string | null
reranker_available
boolean | null
suggested_sources
Source · object[] | null
timing
Timing · object

Timing breakdown for a chat request.

videos_for_selection
VideoSelection · object[] | null