Swap USDC for PRB (prettybitch) tokens on Base via a single x402-authenticated POST request.
What it does
This x402 endpoint lets callers purchase PRB (prettybitch) tokens by spending USDC on the Base network. The caller sends a POST request with an optional `amount` field (in USDC, e.g. "10" or "0.5"); if omitted, the default spend is 5 USDC. The endpoint handles the swap on-chain and returns the swap transaction hash, the send transaction hash, the number of tokens received, and the USDC amount paid.
The PRB token contract is 0xb02ec227Ba060Ee60E205c8a626F2330DD4a5B07, created via Clanker. Payment is made through the x402 protocol using USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) on Base, with a maximum payment of 5 USDC per call. The endpoint is hosted on x420.dev, a platform that appears to provide x402-enabled token interaction pages. According to the landing page stats, the endpoint has processed 49 total transactions across 19 unique users, with an average latency of 2.68 seconds and an 89% success rate.
No formal API documentation exists beyond the x402 challenge schema. The /docs, /api, /pricing, and /README paths all return placeholder pages. All behavioral details are inferred from the x402 outputSchema and the landing page.
Capabilities
Use cases
- —Programmatically buy PRB tokens with USDC via an AI agent or automated workflow
- —Integrate PRB token purchases into a trading bot on Base
- —Allow users to acquire PRB tokens without directly interacting with a DEX
Fit
Best for
- —Agents or bots that need to acquire PRB tokens programmatically
- —Developers building x402-native payment flows on Base
- —Automated portfolio or meme-token accumulation strategies
Not for
- —Swapping arbitrary token pairs — this endpoint only sells PRB
- —Large purchases exceeding 5 USDC per transaction (maxAmountRequired is 5 USDC)
- —Users who need detailed API documentation or SLA guarantees
Quick start
curl -X POST https://prb.x420.dev/api/puff-custom \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <x402-payment-header>" \
-d '{"amount": "2.5"}'Example
Request
{
"amount": "2.5"
}Response
{
"message": "Successfully swapped USDC for PRB tokens",
"tokensReceived": "125000.0",
"usdcAmountPaid": "2.5",
"sendTransactionHash": "0x789abc...012def",
"swapTransactionHash": "0xabc123...def456"
}Endpoint
Quality
The x402 challenge is live and includes a well-structured outputSchema with input/output definitions. However, there is no formal API documentation, no OpenAPI spec, no pricing page, and the response example is inferred from the schema rather than observed. Landing page stats provide some operational context but are limited.
Warnings
- —No formal API documentation exists — /docs, /api, /pricing, /README all return placeholder pages
- —Response example is inferred from outputSchema, not from an actual observed response
- —maxAmountRequired is 5 USDC, which may limit per-transaction spend
- —89% success rate reported on landing page suggests roughly 1 in 10 transactions may fail
- —PRB is a meme/community token created via Clanker — exercise caution regarding liquidity and value
Citations
- —The x402 challenge returns status 402 with maxAmountRequired of 5,000,000 (5 USDC) on Base networkhttps://prb.x420.dev/api/puff-custom
- —PRB token contract is 0xb02ec227Ba060Ee60E205c8a626F2330DD4a5B07, created via Clankerhttps://prb.x420.dev
- —49 total transactions, 19 unique users, 2.68s average latency, 89% success ratehttps://prb.x420.dev
- —Payment asset is USDC at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913https://prb.x420.dev/api/puff-custom
- —Amount field defaults to 5 USDC if not providedhttps://prb.x420.dev/api/puff-custom