Quick Start Guide
Get up and running with LH42 in under 5 minutes. This guide will walk you through setting up your first project, uploading documents, and making your first search query.
Prerequisites
- A LH42 account (sign up here)
- Python 3.8+ or Node.js 18+
- Your API key from the dashboard
Step 1: Install the SDK
Choose your preferred language:
bash
# Python
pip install lakehouse42-sdk
# Node.js
npm install @lakehouse42/sdkStep 2: Initialize the Client
python
from lakehouse42 import LakehouseClient
# Initialize with your API key
client = LakehouseClient(api_key="YOUR_API_KEY")typescript
import { LakehouseClient } from '@lakehouse42/sdk';
const client = new LakehouseClient({
apiKey: 'YOUR_API_KEY'
});Step 3: Upload Your First Document
python
# Upload a document
with open("document.pdf", "rb") as f:
doc = client.documents.upload(file=f)
print(f"Uploaded: {doc.id}")Step 4: Search Your Knowledge Base
python
# Perform a search
results = client.search(
query="What is our return policy?",
limit=5
)
for result in results:
print(f"{result.title}: {result.score}")Next Steps
- Authentication - Learn about API keys and OAuth
- Hybrid Retrieval - Understand how search works
- API Reference - Explore all endpoints