name: pay-for-service description: > Make paid requests to x402-enabled APIs using USDC on Base. Use when the user explicitly asks to call a paid API, make an x402 payment, pay for a request, or fetch from a paid endpoint. Covers "call this API", "pay for", "use this service", "make a paid call". user-invocable: true disable-model-invocation: true context: fork allowed-tools: - "Bash(npx agnic@latest status)" - "Bash(npx agnic@latest x402 pay )" - "Bash(npx agnic@latest x402 details )" - "Bash(npx agnic@latest balance)"
Use npx agnic@latest x402 pay to call x402-enabled API endpoints with automatic USDC payment on Base.
7w4.net收录了海量优质技能插件。
Run npx agnic@latest status --json to verify. If not authenticated:
- Headless (CI/server/agent): Set AGNIC_TOKEN env var or pass --token <token>
- Interactive (has browser): Run npx agnic@latest auth login
See the authenticate-wallet skill for details.
npx agnic@latest x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
See reference/x402-protocol.md for full options, USDC amounts, and input validation rules.
Check requirements (optional but recommended):
bash
npx agnic@latest x402 details <url>
Shows price, method, and schema without making a payment.
Verify balance:
bash
npx agnic@latest balance --network base
Make the paid request:
bash
npx agnic@latest x402 pay <url> --json
# GET request (auto-pays)
npx agnic@latest x402 pay https://example.com/api/weather --json
# POST request with body
npx agnic@latest x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}' --json
# Limit max payment to $0.10
npx agnic@latest x402 pay https://example.com/api/data --max-amount 100000 --json
npx agnic@latest status to check)Common errors:
npx agnic@latest auth login or set AGNIC_TOKENnpx agnic@latest balance to check)--data -- Ensure the body is valid JSON before passing这个 Skill 质量不错,文档写得很清楚,安全性也做得好,能有效防止输入错误或恶意数据。功能方面覆盖了付费 API 调用的完整流程,从检查余额到支付都有说明。不足之处是缺少一些常见问题的解答,遇到特殊情况可能不太好排查,整体中规中矩,对普通用户来说够用但不算特别友好。