Appearance
Litebase Storage
High-performance storage for AI and data-driven applications.
Overview
Litebase Storage is a scalable, immutable key-value storage solution designed for AI-powered applications, large-scale data processing, and multi-modal content management. Whether you're working with real-time AI inference, data retrieval pipelines, or enterprise-grade storage, Litebase provides:
- ✅ Fast storage & retrieval of structured data, embeddings, and AI-generated outputs.
- ✅ Multi-modal support for text, images, videos, and metadata.
- ✅ Low-latency caching for real-time AI and data applications.
- ✅ Versioning & historical tracking for robust audit trails and reproducibility.
Use Cases
1️⃣ AI-Powered Data Retrieval
- Store text embeddings for RAG and AI-powered search.
- Cache vectorized data representations for fast lookup.
- Maintain historical AI responses for continuous improvements.
2️⃣ Multi-Modal Data Storage
- Store structured & unstructured AI-generated content.
- Log inference metadata to track model performance.
- Enable real-time access to multi-modal AI datasets.
3️⃣ Model State & Experiment Tracking
- Log model parameters, training weights, and fine-tuning steps.
- Store and query dataset embeddings for AI applications.
- Maintain version-controlled models for reproducibility.
Usage
1️⃣ Install the SDK
Litebase Storage supports Deno, Node.js.
sh
# Deno
deno add jsr:@litebaseio/storage
# Node.js
npx jsr add @litebaseio/storage2️⃣ Store Structured Data & AI Outputs
Use Litebase Storage to store AI-generated text, embeddings, and metadata.
typescript
import { open } from "@litebaseio/storage";
const storage = open("storage://ai-data");
const tx = await storage.write([
{
key: "data/query_001",
value: {
prompt: "Summarize climate change research.",
model: "gpt-4",
response: "Climate change is driven by greenhouse gas emissions...",
timestamp: new Date().toISOString(),
},
},
]);
console.log(`Stored data. Transaction ID: ${tx}`);sh
curl -X POST "https://api.litebase.io/storage/ai-data/write" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"data": [{
"key": "data/query_001",
"value": {
"prompt": "Summarize climate change research.",
"model": "gpt-4",
"response": "Climate change is driven by greenhouse gas emissions...",
"timestamp": "2025-02-20T10:00:00Z"
}
}]
}'3️⃣ Retrieve Stored Data
Quickly fetch stored data for retrieval-augmented generation (RAG), caching, or analytics.
typescript
const response = await storage.read(["data/query_001"]);
console.log("Retrieved data:", response.data);sh
curl -X POST "https://api.litebase.io/storage/ai-data/read" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"keys": ["data/query_001"]
}'4️⃣ Query Historical Versions
Retrieve previous versions of stored data for debugging, tracking, or retraining.
typescript
const versions = await storage.versions("data/query_001", { limit: 5 });
console.log("Data version history:", versions.data);sh
curl -X POST "https://api.litebase.io/storage/ai-data/versions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"key": "data/query_001",
"limit": 5
}'FAQ
Can Litebase Storage handle large AI datasets?
Yes, Litebase Storage is optimized for high-performance AI and data applications, supporting large datasets, embeddings, and inference results.
How does Litebase Storage handle images and videos?
Litebase supports multi-modal storage, enabling structured metadata tracking alongside AI-generated content for efficient retrieval and auditing.
Can I retrieve previous versions of stored data?
Yes! Litebase Storage keeps historical versions, allowing access to previous AI-generated outputs and dataset snapshots.