Execute directly against our high-throughput gateway. Replace YOUR_LUMOZ_API_KEY with your free developer key.
# 1. Store a vector into your namespace
curl -X POST "https://lumozai.com/api/v1/memory/store" \
-H "Authorization: Bearer YOUR_LUMOZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project": "support-bot",
"text": "Refunds are processed within 48 hours to original payment method.",
"metadata": {"category": "billing"}
}'
# 2. Semantic vector search
curl -X POST "https://lumozai.com/api/v1/memory/search" \
-H "Authorization: Bearer YOUR_LUMOZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project": "support-bot",
"query": "How long do refunds take?",
"top_k": 3
}'
import requests
headers = {
"Authorization": "Bearer YOUR_LUMOZ_API_KEY",
"Content-Type": "application/json"
}
# 1. Store knowledge
requests.post("https://lumozai.com/api/v1/memory/store", headers=headers, json={
"project": "support-bot",
"text": "Enterprise SLA guarantees 99.99% uptime with dedicated routing.",
"metadata": {"tier": "enterprise"}
})
# 2. Semantic Similarity Search
res = requests.post("https://lumozai.com/api/v1/memory/search", headers=headers, json={
"project": "support-bot",
"query": "What is the uptime SLA?",
"top_k": 2
})
print("Search results:", res.json()["results"])
const apiKey = "YOUR_LUMOZ_API_KEY";
// Run Zero-Code RAG: Lumoz automatically pulls relevant memories into the prompt!
const response = await fetch("https://lumozai.com/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "lumoz-llm-1.0",
messages: [
{ role: "user", content: "What is your refund policy window?" }
],
memory: {
project: "support-bot",
top_k: 3
}
})
});
const completion = await response.json();
console.log("AI Answer:", completion.choices[0].message.content);