402mine — Pay-per-use on-chain data for AI agents

An HTTP 402-powered, multi-chain API that lets AI agents and LLMs buy blockchain data with tiny, per-request payments instead of subscriptions.

  • $Pay-per-request model ($0.0004 per call as an example)
  • $No API keys, no monthly plans
  • $AI Agents pay directly on-chain and pass proof of payment
$ curl https://402mine/api/balance?wallet=X
402 Payment Required: send $0.0004 USDC on Solana to wallet Y

$ Multi-Chain HTTP 402 Protocol

402mine is built around HTTP 402 Payment Required to price every API call. The API first returns a 402 error with payment details, then verifies on-chain transactions before serving data.

$ HTTP 402 Flow
1. Agent requests data
2. API responds: 402 Payment Required
- amount: $0.0004
- asset: USDC
- wallet: 0x...
3. Agent pays on-chain
4. Agent retries with tx hash
5. API verifies & serves data
$ Solana
Pay in USDC or SOL
• Sub-second verification
• Low fees (~$0.00001)
• Fast finality
[ ACTIVE ]
$ BSC
Pay in USD1 (or BNB)
• Verified via custom observer
• <3 seconds confirmation
• EVM compatibility
[ ACTIVE ]

$ 402mine Facilitator

The backend coordinator running at https://402mine.tech. It generates payment requests, watches blockchain transactions, and manages payment states in real-time.

$ Payment Lifecycle
Step 1
API asks Facilitator to create invoice
POST /invoice
Step 2
Agent pays invoice on-chain
Tx: 0xabc...
Step 3
Facilitator validates tx
Watch chains
Step 4
API releases requested data
200 OK
$ Invoice Status
[ OK ]Invoice #0xabc... pending
[ OK ]Invoice #0xdef... confirmed
[ !! ]Invoice #0xghi... expired
$ Responsibilities
• Generate unique payment requests
• Watch Solana & BSC chains
• Verify transactions in real-time
• Manage payment states
• Handle expiration & retries

$ Cross-Chain Bridge

402mine can accept payment on one chain to unlock services on another. Pay where it's fastest and cheapest, serve where it makes sense.

Solana Side
Agent has USDC on Solana
Pay: $0.0004 USDC
Speed: ~400ms
Fee: ~$0.00001
Bridge
(Wormhole / LayerZero)
Cross-chain settlement
BSC Side
API expects USD1 on BSC
Unlock: BSC data
Use case: EVM native
Status: Active
Builders can optimize for speed/cost on Solana while still serving use cases native to BSC or other EVMs.

$ 402mine Runner

A simple browser mini-game to onboard the community, showcase the brand, and explore future integrations with on-chain rewards and API usage.

$ Game Description
A browser-based endless runner inspired by Chrome's offline dinosaur game, but with a 402mine twist.
Features:
• Jump, duck, survive
• Collect blocks and tokens
• Leaderboards
• Brand integration
$ Future Integrations
$ 402mine-runner --start
Loading...
Jump. Duck. Survive. Earn your blocks.
Coming Soon:
• On-chain high scores
• NFT rewards for top players
• API usage credits as prizes
• Multi-chain leaderboards

$ 402mine Agent

An AI agent that answers blockchain & coding questions, demonstrates 402mine API integration, and can fetch on-chain data by paying per request.

$ Agent Conversation
user@terminal:~$ ask-agent "What is the balance of wallet X on Solana?"
agent_402mine> Processing request...
agent_402mine> 402 Payment Required: send $0.0004 USDC on Solana to wallet Y...
[Agent initiates on-chain payment]
agent_402mine> Payment confirmed. Balance of wallet X: 12.3456 SOL
$ Code Example
async function fetchBalance(wallet) {
const response = await fetch(
`https://402mine/api/balance?wallet=${wallet}`
);
if (response.status === 402) {
const payment = await response.json();
const tx = await payOnChain(payment);
return fetchBalance(wallet, tx.hash);
}
}
$ Capabilities
• Answer blockchain questions
• Provide coding assistance
• Demonstrate API integration
• Fetch on-chain data on-demand
• Handle 402 payment flow
• Show proof-of-payment examples