API Overview
The Lightfast API provides memory built for teams. Three routes enable you to search by meaning, get full documents, and find similar content.
The Three Routes
Search
POST/api/v1/searchSearch and rank results by meaning with multi-path retrieval
Contents
POST/api/v1/contentsGet full documents and metadata by ID
FindSimilar
POST/api/v1/findsimilarFind related content based on semantic similarity
Base URL
https://lightfast.ai/api/v1
Authentication
All API requests require two headers:
See Authentication for details on obtaining API keys and workspace IDs.
Quick Start
Make Your First Call
Complete Workflow
Core Features
Search by Meaning
Unlike keyword search, Lightfast understands intent and context:
Finds:
- PRs titled "Update auth flow for OAuth2"
- Issues about "login security improvements"
- Discussions on "user session management"
Multi-Path Retrieval
Search uses four parallel paths for comprehensive results:
- Vector search: Semantic similarity
- Entity search: Shared entities (people, repos, topics)
- Cluster search: Topic cluster membership
- Actor search: Contributor expertise
Search Modes
Control quality vs. latency with the mode parameter:
| Mode | Description | Typical Latency |
|---|---|---|
fast | Vector scores only | ~50ms |
balanced | Cohere reranking | ~130ms |
thorough | LLM-based scoring | ~600ms |
Filtering
Filter results by source, type, contributor, or date:
See Search for all filter options.
Error Handling
All errors follow a consistent format:
Common Error Codes
| Code | Status | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid request parameters |
UNAUTHORIZED | 401 | Missing or invalid authentication |
FORBIDDEN | 403 | Access denied to workspace |
NOT_FOUND | 404 | Resource not found |
INTERNAL_ERROR | 500 | Server error |
See Error Reference for complete list and handling strategies.
What Gets Indexed?
Lightfast indexes content from connected sources:
- GitHub: PRs, issues, commits, discussions
- Linear: Issues, comments, projects
- Vercel: Deployments, logs
Connect sources in the Console settings.
Next Steps
- POST /v1/search - Search by meaning
- POST /v1/contents - Get full documents
- POST /v1/findsimilar - Find related content
- Authentication - API key setup
- Errors - Error handling