Quickstart
Make your first query in under a minute. This assumes you already have at least one indexed docset — if not, see Indexing first.
Set your token and base URL
export API_TOKEN="YOUR_API_TOKEN"
export API_URL="https://api.example.com"Ask a question
curl
curl -X POST "$API_URL/ask" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"question": "What is our refund policy?",
"docSetNames": ["company-policies"]
}'Read the response
{
"answer": "Refunds are available within 30 days of purchase [1].",
"citations": [
{
"index": 1,
"fileName": "refund-policy.pdf",
"pageNumber": "2",
"sourceType": "S3",
"sourceMetadata": { "sourceId": "policies/refund-policy.pdf" }
}
],
"usage": { "inputTokens": 1234, "outputTokens": 88, "calls": 2, "perModel": [] }
}That’s the whole core loop. To build a real chat experience — multi-turn conversations, streaming, and rendering citations — continue to the Chatbot guide.