API Reference
Complete reference for the Ricord API. Ingest conversations, search memories, query the knowledge graph, and manage your account programmatically.
Quick Start
Get running in under 5 minutes. Create an account, grab your API key from the dashboard, and make your first request.
1. Ingest a conversation
curl -X POST https://api.ricord.ai/v1/ingest/conversations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user", "content": "I prefer TypeScript over Python" },
{ "role": "assistant", "content": "Noted. TypeScript it is." }
],
"session_id": "session_001"
}'2. Search your memory
curl -X POST https://api.ricord.ai/v1/memories/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "query": "What language does the user prefer?" }'3. Check credit balance
curl https://api.ricord.ai/v1/usage \
-H "Authorization: Bearer YOUR_API_KEY"MCP Setup
Install the Ricord MCP server to give Claude Code, Cursor, Windsurf, VS Code, claude.ai — and any MCP-compatible client — persistent memory across all sessions.
Local clients (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, codex, gemini-cli)
One command. Auto-detects every supported client installed on your machine and wires the MCP server into each.
npx ricord@latest installPass a client name to scope to one — claude-code, claude-desktop, cursor, windsurf, vscode, codex, or gemini-cli. Restart the client after install.
Web clients (claude.ai, ChatGPT)
Remote HTTP transport via OAuth — no install required. Same endpoint for both.
URL: https://mcp.ricord.ai/mcp
Auth: OAuth (click Connect — opens ricord.ai login)
# claude.ai → Settings → Integrations → Add custom integration
# ChatGPT → Settings → Connectors → Add custom connector
# (requires ChatGPT Pro / Team / Enterprise)Manual config (if you'd rather edit the JSON yourself)
Drop this into your client's MCP config file — ~/Library/Application Support/Claude/claude_desktop_config.json for Claude Desktop, ./.cursor/mcp.json for Cursor (project-local), ~/.codeium/windsurf/mcp_config.json for Windsurf, ./.vscode/mcp.json for VS Code (project-local).
{
"mcpServers": {
"ricord": {
"command": "npx",
"args": ["-y", "--package=ricord", "ricord-mcp"],
"env": { "RICORD_API_KEY": "YOUR_API_KEY" }
}
}
}After restarting the client, 13 memory tools appear automatically: ricord_save, ricord_recall, ricord_get_context, and more. See the MCP Tools reference for the full list.
API Playground
Test the hybrid search endpoint directly from your browser. Paste your API key and try a query.
Authentication
All requests require an Authorization header. Two auth methods are supported:
API Key
Best for server-side integrations and agents. Create in the dashboard.
Authorization: Bearer rc_live_abc123...Firebase ID Token
Required for API key management endpoints only. Obtained via Firebase Auth SDK.
Authorization: Bearer eyJhbGciOiJS...Rate Limits by Tier
Rate limit headers on every response: X-RateLimit-Remaining, X-RateLimit-Reset. On 429, check Retry-After.
Ingest
Three ways to get data in. Use conversations for full session pipelines (turns → facts → KB → graph). Use source to ingest URLs, PDFs, YouTube videos, and other rich media. Use insert for raw turn ingestion with async queue support.
Hybrid Search
Cross-layer search across turns, facts, KB pages, and the knowledge graph. Returns a single LLM-ready context string.
Knowledge Wiki
Structured, versioned knowledge articles with semantic search. Supports types, maturity levels, conflict detection, and automatic deprecation. Accessible at /v1/memories.
Knowledge Graph
Entity and relationship graph built automatically from ingested content. Traverse entities, explore neighborhoods, and get snapshots for graph visualization.
KB Pages
Automatically synthesized canonical wiki pages built from ingested conversations. Each page is a living document that rolls up facts, references, and cross-links. Browse, edit, refresh, and export your KB.
KB Intelligence
Higher-order reasoning over your knowledge base. Challenge claims, surface patterns, bridge topics, and find contradictions.
Memories
Manually save, update, and delete individual facts, preferences, and decisions. Use these when you want precise control — the ingest endpoints will also extract memories automatically from conversations.
Preferences
Aggregated user preferences built automatically from ingested conversations. Override explicit values to lock-in choices over auto-inferred ones.
Embeddings
OpenAI-compatible embeddings endpoint. Supports OpenAI and Google models with automatic provider routing.
Assets
Upload and manage files. Two lifecycle zones: permanent (persists indefinitely) and staging (auto-expires).
Usage & Credits
Monitor your credit balance, usage patterns, and rate limits. 1 credit = $0.01 USD. All usage endpoints are free.
API Keys
Create and manage API keys programmatically. These endpoints require Firebase ID token authentication (not API key). Max 25 keys per account.
Data Export & Import
Export all your data at any time and restore it via import. Covers wiki articles, memories, and knowledge base pages with full relationship data. No credit charge. GDPR-compliant. Export format: ricord-export-v1.
MCP Tools Reference
The 13 MCP tools your agent gets after install — 8 core memory + 5 wiki — covering save, recall, correction, procedures, account, and the auto-organized wiki.
Session start
Save & recall
Procedures & account
Wiki (auto-organized)
Health
Service health endpoints. No authentication required.
Error Handling
All errors return a consistent JSON object with a machine-readable type and human-readable message.
{
"error": {
"type": "insufficient_credits_error",
"message": "Insufficient credits. Balance: 2, required: 10",
"param": null,
"code": "insufficient_credits"
}
}Retry pattern
async function withRetry(fn, maxAttempts = 3) {
for (let i = 0; i < maxAttempts; i++) {
try {
return await fn();
} catch (err) {
if (i === maxAttempts - 1) throw err;
// Use Retry-After header for 429, exponential backoff for 5xx
const delay = Math.pow(2, i) * 1000 + Math.random() * 500;
await new Promise(r => setTimeout(r, delay));
}
}
}Credit Costs
1 credit = $0.01 USD. Charges appear in the X-Credits-Charged response header and credits_charged field in the response body.
Ready to get started?
Create a free account and get 100 credits to start building.