Skip to main content

Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Getting Your API Key

  1. Sign up at portal.lawmem.ai
  2. 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

CodeMeaning
401Missing or invalid API key
402Free tier exhausted — payment required
429Rate limit exceeded