Ask
AI-powered Q&A over building documents. Supports both streaming (SSE) and non-streaming responses.
POST
/building_owners/{buildingOwnerId}/buildings/{buildingId}/askAsk a question about a building's documents. Returns an AI-generated answer with citations.
Authentication
x-api-key header
buildingOwnerIdstringBuilding owner / customer IDbuildingIdstringBuilding ID
querystringrequiredThe question to ask (1-5000 characters)stream'true' | 'false'Enable SSE streaming. Default: 'false'language'en' | 'no' | 'nb' | 'nn'Response languagethread_idstring (UUID)Continue an existing conversation threadreasoning_effort'low' | 'medium' | 'high'AI reasoning effort. Default: 'medium'
attached_document_idsstring[]Up to 50 document IDs to include as context for the question
Request Body Example
{
"attached_document_ids": ["doc-1", "doc-2"]
}Examples
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
"https://api.findable.ai/building_owners/cust-456/buildings/bld-789/ask?query=What+fire+safety+measures+are+documented%3F"200Success400Invalid query or parameters401Missing or invalid API key404Building not found
All endpoints may also return 429 (rate limit) and 500 (server error). See Common Patterns for details.
answerstringThe AI-generated answerthread_idstringConversation thread ID (pass back to continue the conversation)citationsRecord<string, Citation>Numbered citations referenced in the answer textcitations[n].cited_textstringThe cited passage from the source documentcitations[n].document_idstringID of the source documentcited_documentsCitedDocument[]Documents referenced in the answercited_documents[].idstringDocument IDcited_documents[].filenamestringDocument filenamefollow_up_suggestionsstring[]Suggested follow-up questions
Response
{
"answer": "Based on the fire safety documents...",
"thread_id": "550e8400-e29b-41d4-a716-446655440000",
"citations": {
"1": { "cited_text": "Section 3.2 states...", "document_id": "doc-1" }
},
"cited_documents": [
{ "id": "doc-1", "filename": "fire-safety-report.pdf" }
],
"follow_up_suggestions": [
"What are the evacuation procedures?",
"Show me the sprinkler system specs"
]
}Streaming Response
When stream=true, the response is sent as Server-Sent Events (SSE).
| Event | Fields | Description |
|---|---|---|
start | thread_id | Stream started |
text | text | Incremental answer text |
thinking | text | AI reasoning text |
finish | thread_id, answer, citations, cited_documents, follow_up_suggestions | Complete response |
error | message | Error occurred |