Make a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install pay-for-service或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install pay-for-service⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/pay-for-service/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: pay-for-service description: Make a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service. user-invocable: true disable-model-invocation: false allowed-tools: ["Bash(npx awal@latest status)", "Bash(npx awal@latest balance)", "Bash(npx awal@latest x402 pay *)"] ---
Use the npx awal@latest x402 pay command to call paid API endpoints with automatic USDC payment on Base.
npx awal@latest status
If the wallet is not authenticated, refer to the authenticate-wallet skill.
npx awal@latest x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
| Option | Description | | ----------------------- | -------------------------------------------------- | | -X, --method | HTTP method (default: GET) | | -d, --data | Request body as JSON string | | -q, --query | Query parameters as JSON string | | -h, --headers | Custom HTTP headers as JSON string | | --max-amount | Max payment in USDC atomic units (1000000 = $1.00) | | --correlation-id | Group related operations | | --json | Output as JSON |
X402 uses USDC atomic units (6 decimals):
| Atomic Units | USD | | ------------ | ----- | | 1000000 | $1.00 | | 100000 | $0.10 | | 50000 | $0.05 | | 10000 | $0.01 |
IMPORTANT: Always single-quote amounts that use $ to prevent bash variable expansion (e.g. '$1.00' not $1.00).
# Make a GET request (auto-pays)
npx awal@latest x402 pay https://example.com/api/weather
# Make a POST request with body
npx awal@latest x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}'
# Limit max payment to $0.10
npx awal@latest x402 pay https://example.com/api/data --max-amount 100000
npx awal@latest status to check, see authenticate-wallet skill)npx awal@latest balance to check)search-for-service skill to find services firstawal auth login first, or see authenticate-wallet skillsearch-for-service to find valid endpointsfund skill安装 Pay For Service 后,可以对 AI 说这些话来触发它
Help me get started with Pay For Service
Explains what Pay For Service does, walks through the setup, and runs a quick demo based on your current project
Use Pay For Service to make a paid API request to an x402 endpoint with automatic USDC pay...
Invokes Pay For Service with the right parameters and returns the result directly in the conversation
What can I do with Pay For Service in my developer & devops workflow?
Lists the top use cases for Pay For Service, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/pay-for-service/ 目录(个人级,所有项目可用),或 .claude/skills/pay-for-service/(项目级)。重启 AI 客户端后,用 /pay-for-service 主动调用,或让 AI 根据上下文自动发现并使用。
Pay For Service 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Pay For Service 可免费安装使用。请查阅仓库了解许可证信息。
Make a paid API request to an x402 endpoint with automatic USDC payment. Use when you or the user want to call a paid API, make an x402 request, use a paid service, or pay for an API call. Use after finding a service with search-for-service.
Pay For Service 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Pay For Service
Identifies repetitive steps in your workflow and sets up Pay For Service to handle them automatically