DocumentationBuild agent-powered products with LiveAuth

Everything you need to integrate LiveAuth into your application. From proof-of-work verification to Lightning payments.

Core Auth

Proof-of-work verification that humans pass instantly, bots can't afford.

verified_user

How It Works

LiveAuth generates a cryptographic challenge that browsers solve in 200-800ms. Real devices pass instantly; bots pay the CPU cost.

  • No cookies or fingerprinting
  • 21 sat Lightning fallback option
  • JWT tokens returned on success
View on GitHub →
npm install @liveauth-labs/sdk

import { LiveAuth } from '@liveauth-labs/sdk';

const liveauth = new LiveAuth({
  publicKey: 'la_pk_xxx'
});

const result = await liveauth.verify();
// result: { method: 'pow' | 'lightning', token: 'jwt...' }

MCP Server

Authenticate AI agents with the Model Context Protocol.

smart_toy

AI Agent Authentication

Drop-in MCP server for Claude Desktop, GPT, AutoGPT, and any MCP client. Agents get authenticated automatically.

  • Works with Claude, GPT, AutoGPT
  • Automatic JWT token generation
  • Metered API access with sats per call
View on GitHub →
# 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"
      }
    }
  }
}

Sats Printer

Print sats to any Lightning address. Instant Bitcoin for agents.

print

Fund Agents Instantly

Give agents their own wallets. Top up programmatically. Power agent economies with microtransactions.

  • One-click sats printing
  • Programmatic API access
  • Track balances per agent
Try Sats Printer →
# Print sats to a Lightning address
curl -X POST https://api.liveauth.app/api/sats/print \
  -H "Authorization: Bearer la_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"lightningAddress": "user@wallet.com", "sats": 1000}'

L402 Payments

Monetize your API with per-request Lightning payments.

payments

Pay-Per-Use API Access

Gate endpoints with Lightning payments. Agents pay as they go. No subscriptions required.

  • 1-10 sats per API call
  • Automatic payment flow (402 → invoice → token)
  • Token valid for 1 hour
# 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
curl -H "Authorization: L402 l402_xxx" https://api.liveauth.app/api/mcp/start

API Reference

Quick reference for main API endpoints.

api

Authentication

# 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 }
account_balance_wallet

L402 Payments

# 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