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 compatible APIs
Browse the built-in directory of verified endpoints: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.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.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 Check
Verify an endpoint from your terminal without writing any code:Next Steps
- Configuration - all constructor options, budget settings, environment variables
- Claude Desktop - give Claude the ability to pay for APIs
- CLI Reference - terminal commands and Python bridge