Authentication

API keys and securing your Memoid integration

Memoid uses API keys to authenticate requests.

Getting Your API Key

  1. Log in to your dashboard
  2. Navigate to your project settings
  3. Copy your API key

Your key will look like:

mem_sk_live_xxxxxxxxxxxxxxxxxxxx

Using Your API Key

Include the key in the Authorization header:

curl -X POST https://api.memoid.dev/v1/memories 
  -H "Authorization: Bearer mem_sk_live_xxxx" 
  -H "Content-Type: application/json" 
  -d '{"messages": [...]}'

Or use the SDK:

from memoid import MemoryClient

client = MemoryClient("mem_sk_live_xxxx")

Key Types

TypePrefixUse Case
Livemem_sk_live_Production applications
Testmem_sk_test_Development and testing

Test keys use isolated data and don’t count toward usage limits.

Security Best Practices

Never expose keys in client-side code

API keys should only be used server-side. Never include them in:

  • JavaScript bundles
  • Mobile app code
  • Public repositories

Use environment variables

import os
from memoid import MemoryClient

client = MemoryClient(os.environ["MEMOID_API_KEY"])

Rotate keys regularly

Generate new keys periodically and revoke old ones.

Use separate keys per environment

Create different keys for development, staging, and production.

Rate Limits

PlanRequests/minuteMemories/month
Free6010,000
Pro600100,000
EnterpriseUnlimitedUnlimited

Rate limit headers are included in all responses:

  • X-RateLimit-Limit: Maximum requests per minute
  • X-RateLimit-Remaining: Requests remaining
  • X-RateLimit-Reset: Timestamp when limit resets

Troubleshooting

401 Unauthorized

  • Check that your API key is correct
  • Ensure the key hasn’t been revoked
  • Verify the Authorization header format

429 Too Many Requests

  • You’ve exceeded rate limits
  • Wait for the reset time or upgrade your plan