Pay 0.01 USDC on Base Sepolia to receive a motivational quote via x402.
What it does
x402-motivate-api is a simple demonstration API that returns a motivational quote in exchange for a micro-payment of 0.01 USDC on the Base Sepolia testnet. It uses the x402 payment protocol, meaning callers must include an X-PAYMENT header with a valid payment proof to access the /motivate endpoint. On success, the API returns a JSON object containing an inspirational quote string and a timestamp.
The API is hosted on Vercel and also exposes auxiliary endpoints: a health check (GET /health), a USDC balance lookup (GET /balance/:address), and a test-USDC faucet (POST /faucet). These supporting endpoints are not paywalled and exist to help developers experiment with the x402 flow on a testnet. The payment is accepted in USDC (contract 0x036CbD53842c5426634e7929541eC2318f3dCF7e) on Base Sepolia, paid to address 0xA4762B196176F96e4380FC17716A1a8c2eB60161.
This is explicitly a demo/learning project (source code available on GitHub) rather than a production service. It is useful for developers who want to understand how x402 payment challenges work or who are building agents that need to handle paid API calls.
Capabilities
Use cases
- —Learning how x402 payment challenges and X-PAYMENT headers work
- —Testing agent wallets and micropayment flows on Base Sepolia testnet
- —Prototyping pay-per-call API integrations with USDC
- —Getting a quick motivational quote as a lightweight paid endpoint
Fit
Best for
- —Developers learning the x402 protocol
- —Agent builders testing micropayment flows on testnet
- —Hackathon prototypes needing a simple paid endpoint
Not for
- —Production motivational content at scale
- —Mainnet payment workflows (this uses Base Sepolia testnet only)
- —Applications requiring curated or attributed quotes
Quick start
curl -X GET http://x402-motivate-api.vercel.app/motivate \
-H "X-PAYMENT: <your-x402-payment-proof>"Example
Response
{
"quote": "The only way to do great work is to love what you do.",
"timestamp": "2025-01-15T12:34:56.789Z"
}Endpoint
Quality
The endpoint is live (402 challenge captured), has an outputSchema describing the response, and the root page provides a clear JSON description of all endpoints and pricing. However, there are no formal docs, no OpenAPI spec, and the response example is inferred from the schema rather than observed. This is a testnet demo, not a production service.
Warnings
- —Testnet only (Base Sepolia) — not suitable for real-value transactions
- —Demo/learning project; no SLA or uptime guarantees
- —No formal API documentation or OpenAPI spec available
- —Response example is inferred from outputSchema, not from an actual observed response
Citations
- —The API charges 0.01 USDC per call on Base Sepoliahttp://x402-motivate-api.vercel.app
- —Endpoints include GET /health, GET /balance/:address, POST /faucet, and GET /motivatehttp://x402-motivate-api.vercel.app
- —Source code is available on GitHubhttps://github.com/jnix2007/x402-demo
- —Payment is in USDC (asset 0x036CbD53842c5426634e7929541eC2318f3dCF7e) to address 0xA4762B196176F96e4380FC17716A1a8c2eB60161http://x402-motivate-api.vercel.app/motivate
- —The output schema returns a quote string and a timestamp stringhttp://x402-motivate-api.vercel.app/motivate