Authentication

Learn how to authenticate with the Memoid API using API keys, JWT tokens, and workspace keys. Includes security best practices.

Memoid uses API keys to authenticate requests.

Getting Your API Key

  1. Sign up for a free Memoid account
  2. Log in to your dashboard
  3. Copy your API key

Your key will look like:

mem_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2

Using Your API Key

Include the key in the Authorization header:

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

Or use Token prefix:

Authorization: Token mem_xxxxx

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

export MEMOID_API_KEY=mem_xxxxx

Rotate keys regularly

Generate new keys periodically and revoke old ones from the dashboard.

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