Ask

AI-powered Q&A over building documents. Supports both streaming (SSE) and non-streaming responses.

POST/building_owners/{buildingOwnerId}/buildings/{buildingId}/ask

Ask a question about a building's documents. Returns an AI-generated answer with citations.

Authentication

x-api-key header

  • buildingOwnerIdstringBuilding owner / customer ID
  • buildingIdstringBuilding ID
  • querystringrequiredThe question to ask (1-5000 characters)
  • stream'true' | 'false'Enable SSE streaming. Default: 'false'
  • language'en' | 'no' | 'nb' | 'nn'Response language
  • thread_idstring (UUID)Continue an existing conversation thread
  • reasoning_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"
  • 200Success
  • 400Invalid query or parameters
  • 401Missing or invalid API key
  • 404Building not found

All endpoints may also return 429 (rate limit) and 500 (server error). See Common Patterns for details.

  • answerstringThe AI-generated answer
  • thread_idstringConversation thread ID (pass back to continue the conversation)
  • citationsRecord<string, Citation>Numbered citations referenced in the answer text
  • citations[n].cited_textstringThe cited passage from the source document
  • citations[n].document_idstringID of the source document
  • cited_documentsCitedDocument[]Documents referenced in the answer
  • cited_documents[].idstringDocument ID
  • cited_documents[].filenamestringDocument filename
  • follow_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).

EventFieldsDescription
startthread_idStream started
texttextIncremental answer text
thinkingtextAI reasoning text
finishthread_id, answer, citations, cited_documents, follow_up_suggestionsComplete response
errormessageError occurred