NewMCP ServerView docs
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_KEY

You can generate API keys in your dashboard settings. Keep your keys secure and never expose them in client-side code.

POST/v1/chat/completions

Chat 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/documents

Upload 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/documents

List 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.

CodeDescription
200Success
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - insufficient permissions
404Not found - resource doesn't exist
429Rate limited - too many requests
500Server error - something went wrong

Ready to build?

Get your API key and start integrating Lakehouse into your applications.