Authentication
All API requests require a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Getting Your API Key
- Sign up at portal.lawmem.ai
- Your API key is on the Overview page — click Reveal to view it
Free Tier
New accounts receive 1,000 lifetime free calls. No credit card required. After 1,000 calls, requests return HTTP 402 unless you have an active subscription or USDC balance.
Pay-Per-Call with USDC
lawmem.ai supports autonomous agent payments via the x402 protocol on Base mainnet. When your free tier is exhausted:
HTTP 402 Payment Required
X-Payment-Required: true
X-Payment-Amount: 0.005
X-Payment-Token: USDC
X-Payment-Network: base
Error Responses
| Code | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 402 | Free tier exhausted — payment required |
| 429 | Rate limit exceeded |