Skip to main content

Step 1: Explore Mode (no keys)

Create a BoltzPay instance with an empty config. No credentials needed: you can discover APIs, check prices, and get quotes for free.

Get a price quote

Multi-chain pricing

Some endpoints accept payment on multiple chains. The quote includes all options:

Discover APIs from the registry

Browse scored and indexed endpoints from the BoltzPay registry:
Filter by protocol, minimum score, or keyword:

Step 2: Payment Mode (x402 — USDC)

Add Coinbase CDP credentials to pay x402 endpoints (USDC on Base). The SDK detects whether an endpoint requires payment, negotiates the protocol, pays, and returns the data.
Don’t have Coinbase keys yet? See Installation for setup instructions.

Step 2b: Lightning Mode (L402 — Bitcoin, optional)

Add an NWC connection string to also pay L402 endpoints (Bitcoin via Lightning Network). Both protocols can be enabled simultaneously — the SDK auto-detects which one each endpoint uses.
Get your NWC connection string for free from Coinos, Primal, or any NWC-compatible wallet. See Installation for details.
For MPP wallets (Tempo, Stripe), see Configuration.

Step 3: Read the Response

agent.fetch() returns a BoltzPayResponse with familiar methods (json(), text()) plus payment metadata.

Free endpoints pass through

If the endpoint does not require payment, fetch() works like a normal HTTP call. No payment is made, and response.payment is null.

Full Example

Quick CLI Quote

Verify an endpoint from your terminal without writing any code:

Next Steps

  • Configuration - all constructor options, budget settings, environment variables
  • Registry - how the registry scores and indexes paid APIs
  • Sessions - persistent payment sessions and channels
  • Claude Desktop - give Claude the ability to pay for APIs
  • CLI Reference - terminal commands and Python bridge