Memory API quickstart: add, search and chat over your data

Use the MyMemory REST API to add content, run hybrid semantic search with tag and date filters, and ask grounded questions, with copy-paste curl examples.

· 2 min read

Quick answer

Authenticate with a Bearer API key, POST content to /v1/add, search it with POST /v1/search (query, limit, spaces, before/after dates), filter by tags with GET /v1/memories?tags=a,b&tagMode=and, and ask questions with POST /v1/chat. The base URL is https://api.mymemory.dev/v1.

MyMemory's REST API gives your own apps the same memory layer the product uses: ingestion with content extraction, hybrid search and grounded chat. You don't have to run a vector database or pick an embedding model.

Authenticate

Create an API key in the dashboard. Keys start with sm_. Send it on every request:

export MM_KEY="sm_your_api_key_here"
# Header: Authorization: Bearer $MM_KEY

Base URL: https://api.mymemory.dev/v1

Add a memory

content can be text or a URL. URLs are fetched and cleaned automatically.

curl -X POST https://api.mymemory.dev/v1/add \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "https://example.com/article",
    "spaces": ["space-uuid"],
    "tags": ["research", "ai"]
  }'

Optional fields: spaces (up to 5), tags, metadata (any JSON) and eventAt (ISO date the content happened, useful for journals and meeting notes).

Tags are normalized server-side: lowercased, a leading # stripped, limited to letters, digits, spaces, - and _, trimmed to 32 characters, and capped at 20 per memory.

curl -X POST https://api.mymemory.dev/v1/search \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "how to set up CI pipelines",
    "limit": 10,
    "spaces": ["space-uuid"],
    "after": "2026-01-01T00:00:00Z"
  }'
FieldMeaning
queryNatural-language query (required)
limit1–100, default 10
threshold0–1 similarity floor for vector-only matches, default 0.65
spacesRestrict to these space IDs
before / afterISO 8601 date bounds
recencyBias0–1; 0 is pure relevance, higher favours recent memories

Filter by tags

# AND: must have every tag
curl "https://api.mymemory.dev/v1/memories?tags=deep-learning,research&tagMode=and" \
  -H "Authorization: Bearer $MM_KEY"

# OR: any of the tags
curl "https://api.mymemory.dev/v1/memories?tags=deep-learning,robotics&tagMode=or" \
  -H "Authorization: Bearer $MM_KEY"

# All your tags with counts
curl "https://api.mymemory.dev/v1/tags" -H "Authorization: Bearer $MM_KEY"

To change tags without re-embedding the content, PATCH /v1/memories/:id with {"tags": [...]}.

Ask a grounded question

curl -X POST https://api.mymemory.dev/v1/chat \
  -H "Authorization: Bearer $MM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{ "role": "user", "content": "Summarize what I saved about CI caching" }],
    "spaces": ["space-uuid"],
    "stream": false
  }'

Chat streams by default; set "stream": false for a single JSON response. It accepts the same spaces, before, after and recencyBias controls as search.

Rate limits

Rate limits are per minute, per endpoint: Free allows 60 requests/min, Plus allows 300, and Pro allows 600. See pricing.