Skip to main content

🤖 aimpn — Official Python SDK for AI Micropayment Network v2.0

Zero-Gas x402 Micropayment Paywalls for HuggingFace Spaces, Gradio, FastAPI, and AI Agents on Base Mainnet (L2).

PyPI version License: MIT Base Mainnet


⚡ Installation

pip install aimpn

🚀 Quick Start (HuggingFace Spaces / Gradio / FastAPI)

Add an instant zero-gas x402 paywall to any AI model inference endpoint in just 1 line of code:

from aimpn import require_x402_payment

@require_x402_payment(amount="0.01", recipient="0xYourBaseWalletAddress", model_name="Llama-3-70B Space")
def predict(prompt: str, payment_header: str = None):
    # Your standard AI generation logic here
    return f"🤖 AI Generated response for: {prompt}"

🎁 Why developers love this

When an AI agent calls your monetized endpoint without a payment header, aimpn automatically returns an HTTP 402 Payment Required exception with full instructions on how to send the $0.01 USDC micropayment using our Zero-Gas ERC-4337 Paymaster (0x7Df0AA...).

Bonus: Builders who call your endpoint 100 times automatically receive a $10.00 USDC Builder Bounty from our on-chain indexer!


Visit https://github.com/tdpeta754-design/ai-micropayment-network for full documentation and interactive playgrounds.

Metadata

Release files for aimpn 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aimpn 2.0.0
File Size Uploaded Provenance
aimpn-2.0.0.tar.gz 3.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aimpn 2.0.0
File Interpreter ABI Platform
aimpn-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / aimpn-2.0.0.tar.gz

Download URL aimpn-2.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8bc82161038b864eeae3471c37b0358ff2233577a2f1fe0e07242db07e27f668
BLAKE2b-256 checksum
How to use checksums
648b9fb5b2c9ff00c5edfcd6a75f0636580737f95cd0862bfbcae93399a4d652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Release files / aimpn-2.0.0-py3-none-any.whl

Download URL aimpn-2.0.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60ad8c96852406ebc4966c03fa627c8d8630078d84fb8b2c8dc9ab81c26ba9ea
BLAKE2b-256 checksum
How to use checksums
dbcdeb38efa609999366b8d301abf75448d256f674955ef49489f86f190ddd07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Security for aimpn 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aimpn-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page