LHC Core API
The LHC Core API is the central management API for the Lakehousecat platform. It covers user and group management, model configuration, prompt templates, and authentication.
Base URL: http://<host>:42021
What you can do
- Manage users and groups (create, update, delete, assign roles)
- Configure custom and provider models
- Manage prompt templates and prompt groups
- Assign data sources, models, and job definitions to users or groups
- Handle authentication and API key management
- Access audit logs
Authentication
All endpoints require a Bearer token. Generate your API key in the Lakehousecat UI:
Account Settings → Security → API Keys → Generate API Key
Authorization: Bearer <your-api-key>
Quick Start
List all models
curl -X GET "http://localhost:42021/api/v1/lhc/models" \
-H "Authorization: Bearer <your-api-key>"
import requests
BASE_URL = "http://localhost:42021"
HEADERS = {"Authorization": "Bearer <your-api-key>"}
response = requests.get(f"{BASE_URL}/api/v1/lhc/models", headers=HEADERS)
models = response.json()
List all groups
curl -X GET "http://localhost:42021/api/v1/lhc/groups" \
-H "Authorization: Bearer <your-api-key>"
response = requests.get(f"{BASE_URL}/api/v1/lhc/groups", headers=HEADERS)
groups = response.json()
Add a user to a group
curl -X POST "http://localhost:42021/api/v1/lhc/usergroups" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"user_id": "user-123", "group_id": "group-456"}'
response = requests.post(
f"{BASE_URL}/api/v1/lhc/usergroups",
json={"user_id": "user-123", "group_id": "group-456"},
headers=HEADERS,
)
Assign a model to a group
curl -X POST "http://localhost:42021/api/v1/lhc/modelgroups" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"model_id": "model-789", "group_id": "group-456"}'
response = requests.post(
f"{BASE_URL}/api/v1/lhc/modelgroups",
json={"model_id": "model-789", "group_id": "group-456"},
headers=HEADERS,
)
List audit logs
curl -X GET "http://localhost:42021/api/v1/lhc/audit-logs" \
-H "Authorization: Bearer <your-api-key>"
response = requests.get(f"{BASE_URL}/api/v1/lhc/audit-logs", headers=HEADERS)
logs = response.json()
Endpoint Groups
The LHC Core API covers the following resource groups:
| Resource | Path | Description |
|---|---|---|
| Users | /api/v1/lhc/users | User lifecycle management |
| Groups | /api/v1/lhc/groups | Group management |
| User Groups | /api/v1/lhc/usergroups | Assign users to groups |
| Models | /api/v1/lhc/models | Model configuration |
| Model Groups | /api/v1/lhc/modelgroups | Assign models to groups |
| Model Users | /api/v1/lhc/modelusers | Assign models to users |
| Prompts | /api/v1/lhc/prompts | Prompt template management |
| Prompt Groups | /api/v1/lhc/promptgroups | Assign prompts to groups |
| Jobs | /api/v1/lhc/jobs | Job execution |
| Audit Logs | /api/v1/lhc/audit-logs | Platform audit trail |
| Authentication | /api/v1/lhc/auths | Auth and API key management |
Dependency Order
When setting up a new environment programmatically, follow this order:
- Create groups (
/groups) - Create or invite users (
/users) - Assign users to groups (
/usergroups) - Configure models (
/models) - Assign models to groups or users (
/modelgroups,/modelusers) - Configure prompts and assign them (
/prompts,/promptgroups)
UI Equivalent
Most operations in this API correspond directly to the Administration section of the Lakehousecat UI (user management, model configuration, group assignments).