BoltHub logoBoltHub

bolthub Documentation

Monetize any API with Lightning micropayments using the L402 protocol.

Welcome to bolthub

bolthub is a non-custodial payment gateway. It puts any HTTP API behind Lightning Network micropayments using the L402 protocol. Clients pay per request in sats. No API keys, no accounts, no signup.

For API consumers

  • MCP Registry: one config, every API; the recommended way to connect AI agents
  • MCP Bridge: connect an AI agent to a specific paywalled API via MCP
  • CLI: search, explore, and call APIs from the terminal
  • Using Paywalled APIs: step-by-step guide to calling L402-gated endpoints
  • Wallet Setup: choose and configure a Lightning wallet
  • TypeScript SDK: @bolthub/agent for automated L402 payments
  • Python SDK: bolthub pip package

For API providers

Key concepts

ConceptDescription
L402HTTP 402 Payment Required + Lightning invoice + macaroon-based auth
Non-custodialPayments flow directly to the provider's wallet; bolthub never holds funds. Consumers can pay with any Lightning wallet.
GatewayReverse proxy at {slug}.gw.bolthub.ai that handles payment verification
Pricing modelsper_request, per_kb, token_bucket, time_pass, metered