Powered by x402 Protocol
Pay per message with USDC. No accounts. No API keys.
pip install x402mail[cdp]
Built on Base L2 ยท Payments via x402
The HTTP 402 status code, finally used for its intended purpose
Client
Calls API
API Call
send_email request
Payment Required
Server responds
USDC Payment
$0.005 via x402
Email Sent
Delivered instantly
Client calls API
Calls send_email
Server returns Payment Required
Client pays $0.005 USDC
Email delivered
Your inbox address: inbox-{wallet}@x402mail.com
Pay only for what you use. No subscriptions. No minimums.
send_email
$0.005
per email
Spam-checked by AI
get_inbox
$0.001
per call
Returns inbox address
list_messages
$0.002
per call
List all messages
read_message
$0.001
per message
Full message content
Send your first email in 3 lines of Python
pip install x402mail[cdp]
export CDP_API_KEY_ID="your-key-id" # from cdp.coinbase.com
export CDP_API_KEY_SECRET="your-key-secret"
export CDP_WALLET_SECRET="your-wallet-secret"
from x402mail import X402Mail
mail = X402Mail.from_cdp()
mail.send(
to="alice@example.com",
subject="Hello from x402mail",
body="Sent with 3 lines of Python!"
)
mail.inbox()
mail.messages(limit=5)
mail.read(message_id=1)
You need a wallet with USDC on Base. $1 covers ~200 emails. See docs for wallet setup.
Payment creates an economic barrier. Spam costs money, delivers nothing.
Every outbound message is verified by AI before sending. Spam gets rejected.
Spam attempts still cost $0.005. Spammers fund the network, get nothing in return.
5 spam attempts triggers a 30-minute timeout. No permanent bans, just time penalties.