DocumentationAPI Reference
REST API
API Reference
Complete reference for the LH42 REST API. Search your knowledge base, chat with AI, and manage documents programmatically.
Base URL
api.lakehouse42.com
Auth
Bearer Token
Rate Limit
1000 req/min
Version
v1
Authentication
All API requests require authentication using a Bearer token. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYYou can generate API keys in your dashboard settings. Keep your keys secure and never expose them in client-side code.
POST
/v1/searchSearch
Perform hybrid search across your knowledge base
curl -X POST https://api.lakehouse42.com/v1/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What are our Q4 revenue projections?",
"limit": 10,
"options": {
"retrieval": "hybrid",
"rerank": true
}
}'POST
/v1/chat/completionsChat Completions
Generate AI responses with RAG context
curl -X POST https://api.lakehouse42.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "What are our main competitive advantages?"
}
],
"stream": false
}'POST
/v1/documentsUpload Document
Upload and index a new document
curl -X POST https://api.lakehouse42.com/v1/documents \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "metadata={"source": "uploads", "department": "engineering"}"GET
/v1/documentsList Documents
Retrieve all documents in your knowledge base
curl -X GET "https://api.lakehouse42.com/v1/documents?limit=10&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY"DELETE
/v1/documents/{id}Delete Document
Remove a document from the index
curl -X DELETE https://api.lakehouse42.com/v1/documents/doc_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Error Handling
The API uses conventional HTTP response codes to indicate success or failure.
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid or missing API key |
| 403 | Forbidden - insufficient permissions |
| 404 | Not found - resource doesn't exist |
| 429 | Rate limited - too many requests |
| 500 | Server error - something went wrong |
Ready to build?
Get your API key and start integrating Lakehouse into your applications.