Current collected state Current
Observed since 20 Oct, 22:53 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agentpay-python
AgentPay Python SDK — Lightning Network payments for AI agents
Lightning Network payment infrastructure for AI agents. L402 paywall, credit management, and idempotent spending — in one clean SDK.
pip install agentpay-python
from agentpay import AgentPayClient
# Get an API key (50 free credits on signup)
client = AgentPayClient(api_key="sg_...")
bal = client.get_balance()
print(f"Balance: {bal.credits_remaining} credits")
# Spend credits (idempotent — safe to retry)
result = client.spend(amount=5.0, description="AI call")
print(f"Spent: {result.credits_used}, Remaining: {result.credits_remaining}")
# Usage forecast
forecast = client.forecast(estimated_cost_per_call=0.05)
if forecast.will_exhaust:
print("Credits running low!")
print(f"Estimated calls remaining: {forecast.estimated_calls_remaining}")
# L402 Paywall — generate Lightning invoice
pw = client.generate_paywall(amount=10.0, description="Premium content")
print(f"Invoice: {pw.invoice}")
# Topup — purchase more credits
top = client.topup(usd_amount=5.0)
print(f"Topup invoice: {top.invoice}")
Full API documentation: api.aipp.dev/docs
MIT — use it, ship it, build on it.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
httpxEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | httpx>=0.25.0 | runtime |
bdist_wheel · 4.96 KB · Python py3
sdist · 4.3 KB · Python source
Observed since 20 Oct, 22:53 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:b82235513a3f8e2e5572599f77a5ecddcd461d81742eacf6304b86717f1d718b