Quickstart

Get CLAIV Memory working in your application in under 5 minutes.

1Create an account and project

Register for beta access at claiv.io and create your first project from the dashboard once invited. Each project creates an isolated tenant with its own data.

2Generate an API key

Go to your project's API Keys page and create a new key. Copy it immediately — it's only shown once. The tenant_id is inferred from your API key, so you never need to include it in requests.

3Ingest your first event

Store a message event for a user:

Terminal
curl -X POST https://api.claiv.io/v1/ingest \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user-123",
    "type": "message",
    "content": "User prefers dark mode and concise responses"
  }'
Response
{
  "event_id": "evt_abc123",
  "deduped": false
}
After ingest, a background worker enriches the event asynchronously (typically 1–5 seconds). Recall may return empty results until enrichment completes.

4Recall context for your LLM

Retrieve relevant context within a token budget. CLAIV Memory returns context — your LLM generates the final reply.

Terminal
curl -X POST https://api.claiv.io/v1/recall \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user-123",
    "task": "What are the user preferences?",
    "token_budget": 2000
  }'
Response
{
  "system_context": "User prefers dark mode and concise responses.",
  "memory_blocks": [
    {
      "type": "fact",
      "content": "Prefers dark mode",
      "relevance": 0.95
    }
  ],
  "citations": ["evt_abc123"],
  "token_estimate": 42
}

Inject system_context into your LLM's system prompt. The memory_blocks provide structured detail. Token budget range: 200–8000.

5Forget (delete derived data)

Delete derived memory data for compliance. Original events are preserved; derived data (embeddings, summaries) is deleted.

Terminal
curl -X POST https://api.claiv.io/v1/forget \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user-123"
  }'
Response
{
  "receipt_id": "rcpt_xyz789",
  "deleted_counts": {
    "facts": 3,
    "episodes": 1,
    "embeddings": 12
  }
}

Next steps