Most APIs require a human in the loop: sign up, generate a key, configure billing, rotate credentials. That model works well for applications built by developers—but it breaks down when the consumer is an AI agent acting autonomously.
Emailyze now supports the x402 payment protocol, which lets AI agents pay per request in USDC directly over HTTP. No API key. No account. No signup. An agent discovers the endpoint, pays $0.001 per check, and gets a result—without a human ever touching a dashboard.
x402 is an open HTTP extension that enables micropayments embedded directly in API calls. It builds on HTTP status code 402 ("Payment Required"), which has existed since HTTP/1.1 but was never formally implemented—until now.
The protocol works in three steps:
1. The client makes a normal HTTP request. 2. The server responds with 402 Payment Required, including a X-PAYMENT-REQUIRED header describing how to pay (network, amount, recipient address, scheme). 3. The client submits a valid on-chain payment proof in the X-PAYMENT header of a retry request. 4. The server verifies the payment and returns 200 OK with the result.
The entire exchange takes one or two round trips. No sessions, no tokens, no billing portals.
Endpoint:
GET https://api.emailyze.xyz/v1/x402/check/?email={email}
Price: $0.001 USDC per check
Supported networks:
eip155:8453eip155:84532Discovery manifest:
GET https://api.emailyze.xyz/.well-known/x402.json
The manifest follows the x402 discovery spec. AI agents and frameworks can read it to understand how to pay before making their first request.
Here is the complete request sequence:
curl -i "https://api.emailyze.xyz/v1/x402/check/?email=test@mailnull.com"
Response:
HTTP/1.1 402 Payment Required
Content-Type: application/json
X-PAYMENT-REQUIRED: {"scheme":"exact","network":"eip155:8453","maxAmountRequired":"1000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x...","extra":{...}}
{
"error": "Payment required",
"x402Version": 1
}
The client constructs and signs a payment transaction for 0.001 USDC on Base, then retries:
curl -i \
-H "X-PAYMENT: {signed payment proof}" \
"https://api.emailyze.xyz/v1/x402/check/?email=test@mailnull.com"
Response:
HTTP/1.1 200 OK
Content-Type: application/json
X-PAYMENT-RESPONSE: {"success":true,"txHash":"0x..."}
{
"email": "test@mailnull.com",
"domain": "mailnull.com",
"is_disposable": true,
"provider_type": "disposable",
"risk_score": 95,
"mx_valid": true,
"catch_all": false,
"checked_at": "2025-04-25T12:00:00Z"
}
Payment is settled on-chain. The agent gets the result. No account required.
Use the official x402 Python SDK alongside requests:
import os
import requests
from eth_account import Account
from x402.client import x402ClientSync, x402ClientConfig, SchemeRegistration
from x402.mechanisms.evm.exact import ExactEvmClientScheme
from x402.mechanisms.evm.signers import EthAccountSigner
from x402.http import x402HTTPClientSync
account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
signer = EthAccountSigner(account)
client = x402ClientSync.from_config(x402ClientConfig(schemes=[
SchemeRegistration(network="eip155:8453", client=ExactEvmClientScheme(signer)),
]))
http_client = x402HTTPClientSync(client)
session = requests.Session()
resp = http_client.request(
session,
"GET",
"https://api.emailyze.xyz/v1/x402/check/?email=test@mailnull.com",
)
print(resp.json())
# {"is_disposable": true, "risk_score": 95, "provider_type": "disposable", ...}
The x402 HTTP client handles the 402 → payment → retry cycle automatically. Your code just makes a normal request.
Install dependencies:
pip install requests eth-account x402
Use Base Sepolia for testing (free testnet USDC, no real funds):
client = x402ClientSync.from_config(x402ClientConfig(schemes=[
SchemeRegistration(network="eip155:84532", client=ExactEvmClientScheme(signer)),
]))
Traditional API keys have a fundamental assumption: a human manages credentials and billing. That assumption fails when:
With x402, the agent carries its own wallet. It discovers what the API costs, evaluates whether the check is worth $0.001, and pays. Billing is settled on-chain rather than in a SaaS dashboard. No monthly invoices, no overage notifications, no credential rotation.
The manifest at https://api.emailyze.xyz/.well-known/x402.json describes all x402-enabled endpoints, supported networks, prices, and payment schemes. Agent frameworks that implement the x402 spec can automatically discover and configure payment before the first call.
Emailyze is also listed on [x402.org/ecosystem](https://x402.org/ecosystem) alongside other x402-compatible APIs.
If you are using Claude Desktop or another MCP-compatible AI client, the Emailyze MCP server handles x402 payments automatically. You configure your wallet once, and Claude calls the tool directly—no code required.
See the [MCP integration guide](/guides/mcp-guide) for setup instructions.
x402 is additive. If you already have an Emailyze API key or prefer subscription billing, nothing changes. The existing /v1/check/ endpoint with X-API-Key authentication continues to work as before.
x402 is an additional access mode designed specifically for agents and pay-as-you-go use cases.
1. Fund a wallet with USDC on Base mainnet (eip155:8453) or get testnet USDC on Base Sepolia (eip155:84532). 2. Install the x402 Python SDK: pip install x402 eth-account requests 3. Set EVM_PRIVATE_KEY in your environment. 4. Make your first request—the SDK handles the rest.
The discovery manifest is at https://api.emailyze.xyz/.well-known/x402.json. Start there to understand the full payment configuration before writing code.