What Layerum Is
Layerum is a hosted RAG platform for teams that need to ingest knowledge, control access by workspace, and serve reliable answers through API or SDK.
- Hosted endpoint: https://api.layerum.com.
- Public integration contract: /v1/*.
- Authentication: workspace API keys (lyr_wk_...).
Workspace Model
Every team works in isolated workspaces. Permissions, models, entities, documents, and API keys are controlled at workspace scope.
- Multiple workspaces per account based on tier.
- Team members, roles, and operational boundaries stay inside workspace.
- API keys can be scoped by entities and model configs.
Data Model
Knowledge is organized to support both governance and retrieval precision.
- Entity Types define high-level categories.
- Entities form the hierarchy and retrieval scope.
- Documents are attached to entities and indexed into chunks/vectors.
Ingestion Lifecycle
Documents pass through a predictable ingestion flow: upload, parse, chunk, embed, index, and status tracking.
- Small files: direct multipart upload through API.
- Large files: presigned flow (upload/init → S3 POST → upload/complete).
- Ingestion statuses: pending, processing, completed, failed.
- SDK helper ingestion.waitUntilReady handles polling for completion.
Capacity Control
Capacity is account-level by plan and can be distributed across workspaces dynamically. Enforcement is server-side for UI, API, and SDK flows.
- Counted usage: entities, documents bytes, chunks, linked S3 files, pending upload reservations.
- Not counted: audit/access logs, API key metadata, model/provider metadata.
- Presigned uploads are hardened: reservation at upload/init, size/object validation at upload/complete, stale session cleanup.
Security and Governance
Access is explicit, scoped, and revocable at any time.
- API keys are created and managed only in Layerum platform UI.
- Capability model: query:read, data:ingest, and config:manage.
- Per-key controls: entity scope, model scope, requests-per-minute, daily token limit, expiration.
- Rotate and revoke are instant controls without changing integration architecture.
Retrieval Quality
Query behavior is designed for controllable and explainable answers, not just raw text generation.
- Entity-scoped retrieval keeps context relevant.
- Top-K and parent-scope options tune retrieval breadth.
- Citations help trace generated answers back to source chunks.
- Debug query endpoint supports deeper troubleshooting when needed.
Developer Experience
You can integrate with either typed SDK or plain HTTP while keeping the same public contract.
- SDK package: @layerum-team/rag-sdk.
- Public API base: https://api.layerum.com/v1.
- Same auth and limits model for SDK and direct API clients.
import { LayerumClient } from '@layerum-team/rag-sdk';
const client = new LayerumClient({
apiKey: process.env.LAYERUM_API_KEY!,
baseUrl: 'https://api.layerum.com'
});
const source = await client.documents.uploadDirect({
entityId: '<entity_uuid>',
file,
fileName: 'knowledge.pdf',
contentType: 'application/pdf'
});
await client.ingestion.waitUntilReady({
entityId: '<entity_uuid>',
sourceId: source.id
});
const answer = await client.query.run({
entityId: '<entity_uuid>',
modelConfigId: '<model_config_uuid>',
query: 'Summarize key risks and actions'
});Operations and Reliability
The platform focuses on stable production behavior and observable failures.
- Ingestion errors are persisted and available via API and SDK.
- Retry endpoints support deterministic recovery flows.
- Vector indexing is tied to document lifecycle for cleanup consistency.
- Capacity checks reduce risk of runaway storage growth.
Typical Use Cases
- Customer support knowledge assistants for internal teams.
- Private documentation search across departments.
- Compliance and policy retrieval with citations.
- Team-scoped copilots connected to selected knowledge domains.
How to Start
- 1. Create a workspace and configure model connections.
- 2. Create API key in workspace UI and grant capabilities/scopes.
- 3. Create entity structure and upload documents.
- 4. Wait for ingestion completion, then run queries via SDK or API.
Continue with full endpoint and method details in Reference. Reference.