Powered by x402 Protocol

Email infrastructure
powered by x402

Pay per message with USDC. No accounts. No API keys.
pip install x402mail[cdp]

Built on Base L2 ยท Payments via x402

How x402 payments work

The HTTP 402 status code, finally used for its intended purpose

Client calls API

Calls send_email

402

Server returns Payment Required

Client pays $0.005 USDC

Email delivered

Your inbox address: inbox-{wallet}@x402mail.com

Simple, transparent pricing

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

Get started

Send your first email in 3 lines of Python

terminal
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"
main.py
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.

Built-in spam economics

Payment creates an economic barrier. Spam costs money, delivers nothing.

LLM Classification

Every outbound message is verified by AI before sending. Spam gets rejected.

Non-refundable

Spam attempts still cost $0.005. Spammers fund the network, get nothing in return.

Automatic Cooldown

5 spam attempts triggers a 30-minute timeout. No permanent bans, just time penalties.