Everything you need to integrate LiveAuth into your application. From proof-of-work verification to Lightning payments.
Proof-of-work verification that humans pass instantly, bots can't afford.
LiveAuth generates a cryptographic challenge that browsers solve in 200-800ms. Real devices pass instantly; bots pay the CPU cost.
npm install @liveauth-labs/sdk
import { LiveAuth } from '@liveauth-labs/sdk';
const liveauth = new LiveAuth({
publicKey: 'la_pk_xxx', // Public key from dashboard
apiKey: 'la_sk_xxx' // Secret key from dashboard
});
const result = await liveauth.verify();
// result: { method: 'pow' | 'lightning', token: 'jwt...' }
Authenticate AI agents with the Model Context Protocol.
Demo Mode (no config needed):
npx @liveauth-labs/mcp-server
Production (with API key):
# Get keys at https://liveauth.app
# Add to Claude Desktop:
{
"mcpServers": {
"liveauth": {
"command": "npx",
"args": ["-y", "@liveauth-labs/mcp-server"],
"env": {
"LIVEAUTH_API_KEY": "la_pk_xxx"
}
}
}
}
Drop-in MCP server for Claude Desktop, GPT, AutoGPT, and any MCP client. Agents get authenticated automatically.
# Claude Desktop config
npx @liveauth-labs/mcp-server
# Add to claude_desktop_config.json:
{
"mcpServers": {
"liveauth": {
"command": "npx",
"args": ["-y", "@liveauth-labs/mcp-server"],
"env": {
"LIVEAUTH_API_BASE": "https://api.liveauth.app",
"LIVEAUTH_API_KEY": "your-key"
}
}
}
}
Low-level API for building custom agent authentication. Perfect for OpenClaw and autonomous agents.
# Start auth - get PoW challenge
curl -X POST https://api.liveauth.app/api/agent/auth/start \
-H "Content-Type: application/json" \
-H "X-LW-Public: your-public-key" \
-d '{"agentId":"my-agent","publicKey":"your-secret-key"}'
# Verify solution - get auth token
curl -X POST https://api.liveauth.app/api/agent/auth/verify \
-H "Content-Type: application/json" \
-H "X-LW-Public: your-public-key" \
-d '{"sessionId":"uuid","solution":"challenge:nonce"}'
# Validate token
curl -X POST https://api.liveauth.app/api/agent/auth/validate \
-H "Content-Type: application/json" \
-H "X-LW-Public: your-public-key" \
-d '{"token":"jwt-token-here"}'
Monetize your API with per-request Lightning payments.
Gate endpoints with Lightning payments. Agents pay as they go. No subscriptions required.
# 1. Get invoice
curl -X POST https://api.liveauth.app/api/public/l402/invoice
# → { "bolt11": "lnbc1...", "paymentHash": "..." }
# 2. Client pays invoice, then validates
curl -X POST "https://api.liveauth.app/api/public/l402/validate?paymentHash=..."
# → { "token": "l402_xxx" }
# 3. Access gated endpoint (L402 format)
curl -H "Authorization: L402 l402_xxx" https://api.liveauth.app/api/mcp/start
# OR use x402 format (Cloudflare/Coinbase compatible)
curl -H "Authorization: x402 preimage_xxx" https://api.liveauth.app/api/mcp/start
Quick reference for main API endpoints.
# Get PoW challenge
GET /api/public/pow/challenge
Header: X-LW-Public: la_pk_xxx
# Verify PoW solution
POST /api/public/pow/verify
Header: X-LW-Public: la_pk_xxx
Body: { challengeHex, nonce, hashHex, difficultyBits, sig }
# Start Lightning auth
POST /api/public/auth/start
Header: X-LW-Public: la_pk_xxx
# Confirm Lightning payment
POST /api/public/auth/confirm
Body: { sessionId }
# Create invoice POST /api/public/l402/invoice # Validate payment, get token POST /api/public/l402/validate?paymentHash=xxx # Verify token GET /api/public/l402/verify?token=xxx