💧 Spraay — Payment Infrastructure for AI Agents
Spraay is the payment layer for autonomous AI agents. It enables batch crypto payments across 13+ chains, x402 micropayment gateway access (76+ paid endpoints), agent-to-agent USDC settlement, on-chain payroll, Bitcoin PSBT batch transactions, and robot task commissioning via the Robot Task Protocol (RTP).
Quick Setup
CODEBLOCK0
No wallet setup required for gateway calls — the x402 protocol handles payment negotiation automatically via USDC on Base.
Core Capabilities
1. Batch Payments (Smart Contract)
Send ETH or ERC-20 tokens to up to 200 recipients in a single transaction. Available on Base, Ethereum, Arbitrum, Polygon, BNB Chain, Avalanche, Unichain, Plasma, BOB, Solana, Bittensor, and Stacks.
Base contract: INLINECODE0
When to use: User wants to pay multiple people at once, distribute tokens, run payroll, airdrop, or split payments.
CODEBLOCK1
Refer to references/batch-payments.md for full contract ABI, CSV import format, supported chains, and error handling.
2. x402 Gateway (76+ Paid Endpoints)
The Spraay x402 gateway at gateway.spraay.app exposes 76+ endpoints across 16 categories. Agents pay per-request in USDC via the x402 protocol — no API keys, no subscriptions, just micropayments.
Categories and pricing:
| Category | Endpoints | Price Range |
|---|
| AI Inference (OpenRouter + BlockRun) | 93 models | $0.01–0.05 |
| RPC (7 chains via Alchemy) |
7 | $0.001–0.005 |
| Search & RAG (Tavily) | 3 | $0.005–0.01 |
| Communication (Email, SMS, XMTP) | 6 | $0.005–0.01 |
| IPFS Storage (Pinata) | 3 | $0.005–0.01 |
| GPU/Compute (Replicate) | 4 | $0.01–0.05 |
| Oracle/Price Feeds | 4 | $0.001–0.005 |
| Identity/KYC | 3 | $0.01 |
| Escrow | 3 | $0.05–0.25 |
| Bridge (Cross-chain) | 3 | $0.05–0.25 |
| Payroll | 3 | $0.05–0.25 |
| Compliance | 3 | $0.005 |
| Wallet Provisioning | 2 | $0.01 |
| Data/Analytics | 3 | $0.001–0.005 |
| Robot Tasks (RTP) | 8 | $0.01–0.05 |
| Bitcoin (PSBT) | 6 | $0.001–0.02 |
When to use: Agent needs to call any paid API — AI inference, blockchain RPC, search, email, IPFS, or any infrastructure endpoint — and wants to pay per-call instead of managing API keys.
CODEBLOCK2
Refer to references/x402-gateway.md for the full endpoint catalog, payment header format, and Bazaar discovery integration.
3. Bitcoin Batch Payments (PSBT)
Non-custodial Bitcoin batch payments using Partially Signed Bitcoin Transactions (PSBTs). Built on bitcoinjs-lib with Mempool.space API for fee estimation and broadcast.
Endpoints: batch-prepare ($0.02), batch-broadcast ($0.01), fee-estimate, utxos, balance, validate ($0.001 each)
When to use: User wants to send BTC to multiple recipients in a single transaction, or needs Bitcoin fee estimation and UTXO management.
CODEBLOCK3
Refer to references/bitcoin-psbt.md for PSBT workflow, UTXO selection, and fee strategies.
4. Robot Task Protocol (RTP)
Open standard for AI agents to discover, commission, and pay physical robots for real-world tasks via x402 USDC micropayments. Built for the DePIN + AI agent intersection.
Endpoints: discover ($0.01), commission ($0.05), status ($0.005), cancel ($0.01), complete ($0.01), capabilities ($0.005), register ($0.02), heartbeat ($0.005)
When to use: Agent needs to hire a physical robot for a task — delivery, inspection, manipulation, sensing — and pay for it programmatically.
CODEBLOCK4
Refer to references/rtp-protocol.md for the full RTP specification, device registration, and capability schemas.
5. Agent-to-Agent Payments
Spraay enables structured payments between autonomous agents — escrow, milestone-based releases, and batch settlement. Combined with x402, agents can transact without human intervention.
When to use: Multi-agent workflows where agents need to pay each other for completed tasks, hold funds in escrow, or settle batch payments between collaborators.
CODEBLOCK5
MCP Server
Spraay also has a published MCP server with 66 tools for deeper integration:
- - Smithery: INLINECODE6
- Official MCP Registry: INLINECODE7
Use the MCP server when you need programmatic access to all Spraay capabilities from an MCP-compatible agent (Claude, Cursor, etc.).
Supported Chains
| # | Chain | Type | Status |
|---|
| 1 | Base | EVM | ✅ Live |
| 2 |
Ethereum | EVM | ✅ Live |
| 3 | Arbitrum | EVM | ✅ Live |
| 4 | Polygon | EVM | ✅ Live |
| 5 | BNB Chain | EVM | ✅ Live |
| 6 | Avalanche | EVM | ✅ Live |
| 7 | Unichain | EVM | ✅ Live |
| 8 | Plasma | EVM | ✅ Live |
| 9 | BOB | EVM | ✅ Live |
| 10 | Solana | SVM | ✅ Live |
| 11 | Bittensor | Substrate | ✅ Live |
| 12 | Stacks | Clarity | ✅ Live |
| 13 | Bitcoin | UTXO | ✅ Live |
Revenue Model
- - Batch payments: 0.3% protocol fee per transaction
- Gateway endpoints: per-request x402 micropayments (prices above)
- All fees settle to INLINECODE8
Links
- - Gateway: https://gateway.spraay.app
- Docs: https://docs.spraay.app
- GitHub: https://github.com/plagtech
- MCP: INLINECODE9
- Twitter: @Spraayapp
- Farcaster: @plag
💧 Spraay — AI代理支付基础设施
Spraay是自主AI代理的支付层。它支持跨13+条链的批量加密支付、x402微支付网关接入(76+付费端点)、代理间USDC结算、链上薪资、比特币PSBT批量交易,以及通过机器人任务协议(RTP)进行机器人任务委托。
快速设置
bash
设置网关URL(默认公共网关)
export SPRAAY
GATEWAYURL=https://gateway.spraay.app
可选:设置API密钥以进行身份验证访问
export SPRAAY
APIKEY=your-key-here
网关调用无需钱包设置——x402协议通过Base链上的USDC自动处理支付协商。
核心功能
1. 批量支付(智能合约)
单笔交易即可向最多200个收款人发送ETH或ERC-20代币。支持Base、以太坊、Arbitrum、Polygon、BNB Chain、Avalanche、Unichain、Plasma、BOB、Solana、Bittensor和Stacks。
Base合约地址: 0x1646452F98E36A3c9Cfc3eDD8868221E207B5eEC
适用场景: 用户需要一次性向多人付款、分发代币、执行薪资发放、空投或拆分支付。
bash
示例:通过网关进行批量支付
curl -X POST $SPRAAY
GATEWAYURL/api/payments/batch \
-H Content-Type: application/json \
-d {
chain: base,
token: USDC,
recipients: [
{address: 0xAAA..., amount: 100},
{address: 0xBBB..., amount: 50},
{address: 0xCCC..., amount: 75}
]
}
完整合约ABI、CSV导入格式、支持链及错误处理请参阅 references/batch-payments.md。
2. x402网关(76+付费端点)
Spraay x402网关位于 gateway.spraay.app,提供16个类别共76+个端点。代理通过x402协议按请求支付USDC——无需API密钥,无需订阅,仅需微支付。
类别及定价:
| 类别 | 端点数量 | 价格范围 |
|---|
| AI推理(OpenRouter + BlockRun) | 93个模型 | $0.01–0.05 |
| RPC(通过Alchemy支持7条链) |
7 | $0.001–0.005 |
| 搜索与RAG(Tavily) | 3 | $0.005–0.01 |
| 通信(邮件、短信、XMTP) | 6 | $0.005–0.01 |
| IPFS存储(Pinata) | 3 | $0.005–0.01 |
| GPU/计算(Replicate) | 4 | $0.01–0.05 |
| 预言机/价格馈送 | 4 | $0.001–0.005 |
| 身份/KYC | 3 | $0.01 |
| 托管 | 3 | $0.05–0.25 |
| 桥接(跨链) | 3 | $0.05–0.25 |
| 薪资 | 3 | $0.05–0.25 |
| 合规 | 3 | $0.005 |
| 钱包配置 | 2 | $0.01 |
| 数据/分析 | 3 | $0.001–0.005 |
| 机器人任务(RTP) | 8 | $0.01–0.05 |
| 比特币(PSBT) | 6 | $0.001–0.02 |
适用场景: 代理需要调用任何付费API——AI推理、区块链RPC、搜索、邮件、IPFS或任何基础设施端点——并希望按调用付费,而非管理API密钥。
bash
示例:通过x402进行AI推理
curl -X POST $SPRAAY
GATEWAYURL/api/ai/chat \
-H Content-Type: application/json \
-H X-402-Payment:
\
-d {model: claude-sonnet-4-20250514, prompt: Summarize this document}
完整端点目录、支付头格式及Bazaar发现集成请参阅 references/x402-gateway.md。
3. 比特币批量支付(PSBT)
使用部分签名比特币交易(PSBT)进行非托管式比特币批量支付。基于bitcoinjs-lib构建,使用Mempool.space API进行费用估算和广播。
端点: batch-prepare($0.02)、batch-broadcast($0.01)、fee-estimate、utxos、balance、validate(各$0.001)
适用场景: 用户希望单笔交易向多个收款人发送BTC,或需要比特币费用估算和UTXO管理。
bash
准备比特币批量交易
curl -X POST $SPRAAYGATEWAYURL/api/bitcoin/batch-prepare \
-H Content-Type: application/json \
-d {
recipients: [
{address: bc1q..., amount: 50000},
{address: bc1q..., amount: 25000}
],
feeRate: 10,
changeAddress: bc1q...
}
PSBT工作流、UTXO选择及费用策略请参阅 references/bitcoin-psbt.md。
4. 机器人任务协议(RTP)
AI代理通过x402 USDC微支付发现、委托并支付实体机器人执行现实世界任务的开放标准。专为DePIN与AI代理交叉领域构建。
端点: discover($0.01)、commission($0.05)、status($0.005)、cancel($0.01)、complete($0.01)、capabilities($0.005)、register($0.02)、heartbeat($0.005)
适用场景: 代理需要雇佣实体机器人执行任务——配送、检查、操作、感知——并以编程方式支付。
bash
发现可用机器人
curl $SPRAAYGATEWAYURL/api/rtp/discover?capability=delivery&location=37.7749,-122.4194
委托任务
curl -X POST $SPRAAYGATEWAYURL/api/rtp/commission \
-H Content-Type: application/json \
-d {
robotId: robot-001,
task: deliver_package,
params: {destination: 123 Main St, weight_kg: 2.5},
maxBudgetUSDC: 5.00
}
完整RTP规范、设备注册及能力模式请参阅 references/rtp-protocol.md。
5. 代理间支付
Spraay支持自主代理之间的结构化支付——托管、基于里程碑的释放及批量结算。结合x402,代理无需人工干预即可进行交易。
适用场景: 多代理工作流中,代理需要为完成的任务相互支付、将资金存入托管或结算协作者之间的批量支付。
bash
托管:创建任务完成前冻结的支付
curl -X POST $SPRAAYGATEWAYURL/api/escrow/create \
-H Content-Type: application/json \
-d {
payer: 0xAgent1...,
payee: 0xAgent2...,
amount: 10,
token: USDC,
releaseCondition: task_complete
}
MCP服务器
Spraay还发布了包含66个工具的MCP服务器,用于更深层次集成:
- - Smithery: @plagtech/spraay-x402-mcp
- 官方MCP注册表: io.github.plagtech/spraay-x402-mcp
当需要从兼容MCP的代理(Claude、Cursor等)以编程方式访问所有Spraay功能时,请使用MCP服务器。
支持链
以太坊 | EVM | ✅ 已上线 |
| 3 | Arbitrum | EVM | ✅ 已上线 |
| 4 | Polygon | EVM | ✅ 已上线 |
| 5 | BNB Chain | EVM | ✅ 已上线 |
| 6 | Avalanche | EVM | ✅ 已上线 |
| 7 | Unichain | EVM | ✅ 已上线 |
| 8 | Plasma | EVM | ✅ 已上线 |
| 9 | BOB | EVM | ✅ 已上线 |
|