agentcash-wallet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

agentcash Wallet & Paid APIs

agentcash 钱包与付费API

Call any x402-protected API with automatic payment. Payment is the authentication — no API keys or subscriptions needed.
通过自动支付调用任何受x402保护的API。支付即验证——无需API密钥或订阅。

Setup

安装设置

If the agentcash CLI is not yet installed, see rules/getting-started.md for installation and wallet setup.
如果尚未安装agentcash CLI,请查看rules/getting-started.md了解安装和钱包设置方法。

Wallet Management

钱包管理

Your wallet is auto-created on first use and stored at
~/.agentcash/wallet.json
.
首次使用时会自动创建钱包,存储路径为
~/.agentcash/wallet.json

Check Balance

查询余额

bash
npx agentcash wallet info
Returns wallet address, USDC balance, and deposit link. Always check before expensive operations.
bash
npx agentcash wallet info
返回钱包地址、USDC余额和充值链接。执行高成本操作前请务必查询。

Redeem Invite Code

兑换邀请码

bash
npx agentcash wallet redeem YOUR_CODE
One-time use per code. Credits added instantly. Run
npx agentcash wallet info
after to verify.
bash
npx agentcash wallet redeem YOUR_CODE
每个邀请码仅可使用一次。额度会即时到账。兑换后可运行
npx agentcash wallet info
验证。

Deposit USDC

充值USDC

  1. Get your wallet address via
    npx agentcash wallet info
  2. Send USDC on Base network (eip155:8453) to that address
  3. Or use the deposit UI:
    https://x402scan.com/mcp/deposit/<wallet-address>
Important: Only Base network USDC. Other networks or tokens will be lost.
  1. 通过
    npx agentcash wallet info
    获取你的钱包地址
  2. 将Base网络(eip155:8453)上的USDC发送至该地址
  3. 或使用充值UI:
    https://x402scan.com/mcp/deposit/<wallet-address>
重要提示:仅支持Base网络的USDC。其他网络或代币将丢失。

Calling Paid APIs

调用付费API

1. Discover endpoints

1. 发现端点

bash
npx agentcash discover https://stableenrich.dev
Returns all endpoints, pricing, and usage instructions. Read the
instructions
field
— it has critical endpoint-specific guidance.
bash
npx agentcash discover https://stableenrich.dev
返回所有端点、定价和使用说明。请务必阅读
instructions
字段
——其中包含端点特定的关键指引。

2. Check schema (optional)

2. 检查Schema(可选)

bash
npx agentcash check https://stableenrich.dev/api/apollo/people-search
Returns full request/response JSON schemas and pricing for a specific endpoint.
bash
npx agentcash check https://stableenrich.dev/api/apollo/people-search
返回特定端点的完整请求/响应JSON Schema和定价。

3. Make a paid request

3. 发起付费请求

bash
npx agentcash fetch https://stableenrich.dev/api/apollo/people-search -m POST -b '{"person_titles": ["CEO"], "person_locations": ["San Francisco"]}'
Payment is automatic: sends request, gets 402 challenge, signs USDC payment, retries with credential, returns result. Payments settle only on success (2xx) — failed requests cost nothing.
bash
npx agentcash fetch https://stableenrich.dev/api/apollo/people-search -m POST -b '{"person_titles": ["CEO"], "person_locations": ["San Francisco"]}'
支付自动完成:发送请求、获取402挑战、签署USDC支付、携带凭证重试请求、返回结果。仅当请求成功(2xx状态码)时才会结算支付——失败请求不产生费用。

Available Services

可用服务

OriginServiceWhat it does
https://stableenrich.dev
StableEnrichResearch APIs: Apollo (people/org), Exa (web search), Firecrawl (scraping), Grok (X/Twitter), Google Maps, Clado (LinkedIn), Serper (news/shopping), WhitePages, Reddit, Hunter (email verification), Influencer enrichment
https://stableupload.dev
StableUploadPay-per-upload file hosting. 10MB/$0.02, 100MB/$0.20, 1GB/$2.00. 6-month TTL
https://stablestudio.dev
StableStudioAI image/video generation: GPT Image, Flux, Grok, Nano Banana, Sora, Veo, Seedance, Wan
https://stablesocial.dev
StableSocialSocial media data: TikTok, Instagram, X/Twitter, Facebook, Reddit, LinkedIn. $0.06/call, async two-step
https://stableemail.dev
StableEmailSend emails ($0.02), forwarding inboxes ($1/mo), custom subdomains ($5)
https://stablephone.dev
StablePhoneAI phone calls ($0.54), phone numbers ($20), top-ups ($15)
https://stablejobs.dev
StableJobsJob search via Coresignal
Run
npx agentcash discover <origin>
on any origin to see its full endpoint catalog.
源地址服务名称功能说明
https://stableenrich.dev
StableEnrich研究类API:Apollo(人物/机构)、Exa(网页搜索)、Firecrawl(数据抓取)、Grok(X/Twitter)、Google Maps、Clado(LinkedIn)、Serper(新闻/购物)、WhitePages、Reddit、Hunter(邮箱验证)、网红信息增强
https://stableupload.dev
StableUpload按次付费的文件托管服务。10MB/$0.02,100MB/$0.20,1GB/$2.00。文件有效期6个月
https://stablestudio.dev
StableStudioAI图像/视频生成:GPT Image、Flux、Grok、Nano Banana、Sora、Veo、Seedance、Wan
https://stablesocial.dev
StableSocial社交媒体数据:TikTok、Instagram、X/Twitter、Facebook、Reddit、LinkedIn。每次调用$0.06,异步两步式处理
https://stableemail.dev
StableEmail发送邮件($0.02/次)、转发收件箱($1/月)、自定义子域名($5/个)
https://stablephone.dev
StablePhoneAI电话呼叫($0.54/次)、电话号码($20/个)、余额充值($15/次)
https://stablejobs.dev
StableJobs通过Coresignal进行职位搜索
对任意源地址运行
npx agentcash discover <origin>
即可查看其完整端点目录。

Quick Reference

快速参考

TaskCommand
Check balance
npx agentcash wallet info
Redeem code
npx agentcash wallet redeem <code>
Discover endpoints
npx agentcash discover <url>
Check pricing/schema
npx agentcash check <url>
Paid POST request
npx agentcash fetch <url> -m POST -b '{...}'
Paid GET request
npx agentcash fetch <url>
任务命令
查询余额
npx agentcash wallet info
兑换邀请码
npx agentcash wallet redeem <code>
发现端点
npx agentcash discover <url>
检查定价/Schema
npx agentcash check <url>
付费POST请求
npx agentcash fetch <url> -m POST -b '{...}'
付费GET请求
npx agentcash fetch <url>

Tips

提示

  • Always discover first — the
    instructions
    field has critical endpoint-specific patterns and required parameters.
  • Payments settle only on success (2xx) — failed requests cost nothing.
  • Use
    npx agentcash check <url>
    when unsure about request/response format.
  • Add
    --format json
    for machine-readable output,
    --format pretty
    for human-readable.
  • Add
    -v
    for verbose output to see payment details.
  • Network: Base (eip155:8453), Currency: USDC.
  • 请先执行发现操作——
    instructions
    字段包含端点特定的关键模式和必填参数。
  • 仅当请求成功(2xx状态码)时才会结算支付——失败请求不产生费用。
  • 不确定请求/响应格式时,使用
    npx agentcash check <url>
  • 添加
    --format json
    可获取机器可读格式的输出,添加
    --format pretty
    可获取人类友好的格式。
  • 添加
    -v
    可查看详细输出,了解支付细节。
  • 网络:Base(eip155:8453),货币:USDC。

Troubleshooting

问题排查

IssueSolution
"Command not found"Run
npm install -g agentcash
"Insufficient balance"Check balance, deposit USDC or redeem invite code
"Payment failed"Transient error — retry the request
"Invalid invite code"Code already used or doesn't exist
Balance not updatingWait for Base network confirmation (~2 sec)
问题解决方案
"Command not found"运行
npm install -g agentcash
"Insufficient balance"查询余额,充值USDC或兑换邀请码
"Payment failed"临时错误——重试请求
"Invalid invite code"邀请码已被使用或不存在
余额未更新等待Base网络确认(约2秒)