Add one line to a function and every call is metered, logged, and settled. Start free with 100 calls in paper mode. Switch to live payments when you are ready.
# pip install nano-empire-tollbooth from nano_empire_tollbooth import monetize @monetize(price_usd=0.01) def summarize(text: str) -> str: return my_llm(text) # Every call is metered, logged to a JSONL ledger, and settled. # First 100 calls run free in paper mode. No card required.
New to the idea? Start with monetize a Python function in 10 lines or read why AI agents need payment rails.
Attribute cost to a single function call instead of one flat infrastructure bill.
Lock on call, release on success, refund on failure. Failed work does not accrue cost.
A runaway agent hits its ceiling in hours, not at the end of the month.
Every charge is one JSON line with timestamps and status. Auditable by default.
Building agents or tools? See agent-to-agent payments, MCP server monetization, and the x402 protocol explained.
Pricing reflects the package README. Payment and crypto content is informational and is not financial advice.