Pay 1 USDC via x402 to swap for DIR tokens on Base and receive them to your wallet.
What it does
The dir.x420.dev /api/puff endpoint is an x402-enabled service that accepts a 1 USDC payment (on Base network) and automatically swaps it for DIR tokens (contract 0x78e2bABb02BAECeA3449fA3Bea7b190B2e49DB07), returning the purchased tokens to the caller. DIR is a token created via Clanker and traded on Base.
The endpoint uses the x402 payment protocol (version 1, "exact" scheme). When called without payment, it returns a 402 challenge specifying the USDC asset address (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) and a payTo address. Once the X-PAYMENT header is provided with a valid payment proof, the service executes a swap and sends the resulting DIR tokens. The response includes the swap transaction hash, send transaction hash, the amount of tokens received, and the USDC amount paid.
The landing page at dir.x420.dev shows x402 stats including a 100% success rate, average latency of 2.69s, a trust score of 85%, and 5 total transactions from 5 unique users. No formal API documentation, OpenAPI spec, or pricing page exists beyond the x402 challenge itself and the landing page.
Capabilities
Use cases
- —Programmatically purchasing DIR tokens with USDC via an agent-friendly x402 payment flow
- —Integrating automated token swaps into AI agent workflows on Base
- —Acquiring DIR tokens without manually interacting with a DEX
Fit
Best for
- —AI agents that need to autonomously purchase tokens on Base
- —Developers experimenting with x402 payment-gated token swaps
- —Automated portfolio or token accumulation strategies
Not for
- —Large-volume or variable-amount token swaps (fixed 1 USDC amount)
- —Users seeking detailed API documentation or OpenAPI specs
- —Non-Base-network token purchases
Quick start
curl -X GET https://dir.x420.dev/api/puff \
-H "X-PAYMENT: <your-x402-payment-proof>"Example
Response
{
"message": "Successfully swapped USDC for DIR tokens",
"tokensReceived": "1500000000000000000000",
"usdcAmountPaid": "1000000",
"sendTransactionHash": "0x789abc...012def",
"swapTransactionHash": "0xabc123...def456"
}Endpoint
Quality
The endpoint is live with a valid 402 challenge and includes an outputSchema describing the response. However, there is no OpenAPI spec, no formal documentation (docs/api/pricing pages all return 'doesn't exist'), and the service is very niche with only 5 total transactions. The response example is inferred from the outputSchema rather than directly observed.
Warnings
- —No API documentation exists — /docs, /api, /pricing, and /README all return placeholder pages
- —Very low transaction volume (5 total transactions) suggests early-stage or experimental service
- —Fixed 1 USDC payment amount — no variable amount support documented
- —DIR token is a Clanker-created token with unknown liquidity and risk profile
- —Response example is inferred from outputSchema, not from an actual observed response
Citations
- —The endpoint returns a 402 challenge with x402Version 1, exact scheme, on Base network, requiring 1,000,000 units (1 USDC)https://dir.x420.dev/api/puff
- —DIR token contract address is 0x78e2bABb02BAECeA3449fA3Bea7b190B2e49DB07https://dir.x420.dev
- —x402 stats show 5 total transactions, 5 unique users, 100% success rate, 2.69s avg latency, 85% trust scorehttps://dir.x420.dev
- —DIR was created via Clankerhttps://dir.x420.dev
- —USDC asset address on Base is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913https://dir.x420.dev/api/puff