Skip to main content
HomeAPI Reference

API Reference

Complete reference for the Ricord API. Ingest conversations, search memories, query the knowledge graph, and manage your account programmatically.

Base URL: https://api.ricord.aiOpenAPI spec ↗

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

bash
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

bash
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

bash
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.

bash
npx ricord@latest install

Pass 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.

text
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).

json
{
  "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.

http
Authorization: Bearer rc_live_abc123...

Firebase ID Token

Required for API key management endpoints only. Obtained via Firebase Auth SDK.

http
Authorization: Bearer eyJhbGciOiJS...

Rate Limits by Tier

Tier
Req/min
Req/day
Concurrent
Free
20
500
2
Pro
60
5,000
5
Team
120
20,000
10

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.

Knowledge Wiki

Structured, versioned knowledge articles with semantic search. Supports types, maturity levels, conflict detection, and automatic deprecation. Accessible at /v1/memories.

factdecisionreferenceplaybookanti-patternepisodeobservationpreference

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.

Code
Type
Description
400
invalid_request_error
Missing or invalid parameters
401
authentication_error
Missing or invalid API key / token
402
insufficient_credits_error
Credit balance too low for this operation
403
permission_error
API key lacks required permission
404
not_found_error
Resource not found
429
rate_limit_error
Rate limit exceeded — check Retry-After header
500
internal_error
Server error — retry with exponential backoff
502
provider_error
Upstream LLM/embedding provider failure
503
service_unavailable
Service temporarily unavailable
json
{
  "error": {
    "type": "insufficient_credits_error",
    "message": "Insufficient credits. Balance: 2, required: 10",
    "param": null,
    "code": "insufficient_credits"
  }
}

Retry pattern

javascript
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.

Endpoint
Credits
POST /v1/ingest/conversations
3
POST /v1/ingest/source
3
POST /v1/memories/search
1
POST /v1/memories (fact)
1
POST /v1/memories (conversation)
3
POST /v1/memories/:id/feedback
Free
POST /v1/kb/challenge
2
POST /v1/kb/emerge
2
POST /v1/kb/connect
2
POST /v1/embeddings
1–13/1M tokens
POST /v1/assets
2
All GET endpoints
Free
DELETE endpoints
Free

Ready to get started?

Create a free account and get 100 credits to start building.