x402 by coinbase/agentic-wallet-skills
npx skills add https://github.com/coinbase/agentic-wallet-skills --skill x402使用 npx awal@2.0.3 x402 命令来发现、检查和调用使用 X402 支付协议的付费 API 端点。支付使用 Base 网络上的 USDC 进行。
典型的 x402 工作流程是:
使用 BM25 相关性搜索,通过关键词查找付费服务:
npx awal@2.0.3 x402 bazaar search <query> [-k <n>] [--force-refresh] [--json]
| 选项 | 描述 |
|---|---|
-k, --top <n> | 结果数量(默认:5) |
--force-refresh |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 从 CDP API 重新获取资源索引 |
--json | 以 JSON 格式输出 |
结果缓存在本地 ~/.config/awal/bazaar/ 目录下,并在 12 小时后自动刷新。
浏览所有可用资源:
awal x402 bazaar list [--network <network>] [--full] [--json]
| 选项 | 描述 |
|---|---|
--network <name> | 按网络过滤(base, base-sepolia) |
--full | 显示完整详细信息,包括模式 |
--json | 以 JSON 格式输出 |
无需支付即可检查端点的 x402 支付要求:
awal x402 details <url> [--json]
通过尝试每种 HTTP 方法(GET、POST、PUT、DELETE、PATCH)直到收到 402 响应,自动检测正确的方法,然后显示价格、接受的支付方案、网络以及输入/输出模式。
调用 x402 端点并自动完成 USDC 支付:
awal x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
| 选项 | 描述 |
|---|---|
-X, --method <method> | HTTP 方法(默认:GET) |
-d, --data <json> | 请求体,JSON 字符串格式 |
-q, --query <params> | 查询参数,JSON 字符串格式 |
-h, --headers <json> | 自定义 HTTP 请求头,JSON 字符串格式 |
--max-amount <amount> | 最大支付金额,以 USDC 原子单位计(1000000 = $1.00) |
--correlation-id <id> | 关联相关操作 |
--json | 以 JSON 格式输出 |
# 搜索与天气相关的付费 API
awal x402 bazaar search "weather"
# 搜索并显示更多结果
awal x402 bazaar search "sentiment analysis" -k 10
# 检查一个端点的费用
awal x402 details https://example.com/api/weather
# 发起 GET 请求(自动支付)
awal x402 pay https://example.com/api/weather
# 发起带请求体的 POST 请求
awal x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}'
# 将最大支付金额限制为 $0.10
awal x402 pay https://example.com/api/data --max-amount 100000
# 浏览所有集市资源并显示完整详细信息
awal x402 bazaar list --full
X402 使用 USDC 原子单位(6 位小数):
| 原子单位 | 美元 |
|---|---|
| 1000000 | $1.00 |
| 100000 | $0.10 |
| 50000 | $0.05 |
| 10000 | $0.01 |
awal auth login <email>)并且有足够的 USDC 余额(awal balance)awal auth login <email>awal balance 检查)每周安装量
1.5K
代码仓库
GitHub 星标数
76
首次出现
2026年2月11日
安全审计
安装于
codex1.2K
opencode1.2K
gemini-cli1.2K
github-copilot1.2K
kimi-cli1.2K
amp1.2K
Use the npx awal@2.0.3 x402 commands to discover, inspect, and call paid API endpoints using the X402 payment protocol. Payments are made in USDC on Base.
The typical x402 workflow is:
Find paid services by keyword using BM25 relevance search:
npx awal@2.0.3 x402 bazaar search <query> [-k <n>] [--force-refresh] [--json]
| Option | Description |
|---|---|
-k, --top <n> | Number of results (default: 5) |
--force-refresh | Re-fetch resource index from CDP API |
--json | Output as JSON |
Results are cached locally at ~/.config/awal/bazaar/ and auto-refresh after 12 hours.
Browse all available resources:
awal x402 bazaar list [--network <network>] [--full] [--json]
| Option | Description |
|---|---|
--network <name> | Filter by network (base, base-sepolia) |
--full | Show complete details including schemas |
--json | Output as JSON |
Inspect an endpoint's x402 payment requirements without paying:
awal x402 details <url> [--json]
Auto-detects the correct HTTP method (GET, POST, PUT, DELETE, PATCH) by trying each until it gets a 402 response, then displays price, accepted payment schemes, network, and input/output schemas.
Call an x402 endpoint with automatic USDC payment:
awal x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
| Option | Description |
|---|---|
-X, --method <method> | HTTP method (default: GET) |
-d, --data <json> | Request body as JSON string |
-q, --query <params> | Query parameters as JSON string |
-h, --headers <json> | Custom HTTP headers as JSON string |
--max-amount <amount> | Max payment in USDC atomic units (1000000 = $1.00) |
--correlation-id <id> |
# Search for weather-related paid APIs
awal x402 bazaar search "weather"
# Search with more results
awal x402 bazaar search "sentiment analysis" -k 10
# Check what an endpoint costs
awal x402 details https://example.com/api/weather
# Make a GET request (auto-pays)
awal x402 pay https://example.com/api/weather
# Make a POST request with body
awal x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}'
# Limit max payment to $0.10
awal x402 pay https://example.com/api/data --max-amount 100000
# Browse all bazaar resources with full details
awal x402 bazaar list --full
X402 uses USDC atomic units (6 decimals):
| Atomic Units | USD |
|---|---|
| 1000000 | $1.00 |
| 100000 | $0.10 |
| 50000 | $0.05 |
| 10000 | $0.01 |
awal auth login <email>) with sufficient USDC balance (awal balance)awal auth login <email> firstawal balance to check)Weekly Installs
1.5K
Repository
GitHub Stars
76
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
codex1.2K
opencode1.2K
gemini-cli1.2K
github-copilot1.2K
kimi-cli1.2K
amp1.2K
97,600 周安装
| Group related operations |
--json | Output as JSON |