x402
Search for new services and make paid API requests using the x402 payment protocol. Use when you don't have a clear tool to choose, search the bazaar. You can also use this tool if you or the user want to call an x402 endpoint, discover payment requirements, browse the bazaar, or search for paid services.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/0xrag/x402-2What This Skill Does
The x402 skill is a specialized agent capability designed to facilitate the discovery and utilization of paid API services via the X402 payment protocol. By acting as an interface for the X402 bazaar, this tool allows the AI to search for, inspect, and execute paid requests directly. It bridges the gap between traditional API interaction and decentralized finance by automating USDC payments on the Base network. When a user requests data or processing power that requires a fee, this skill handles the discovery of cost structures, endpoint schemas, and the actual execution of the transaction to deliver the requested results seamlessly.
Installation
To integrate the x402 skill into your OpenClaw environment, use the built-in package manager by executing the following command in your terminal:
clawhub install openclaw/skills/skills/0xrag/x402-2
Ensure your system is configured to allow network access, as the skill needs to communicate with the X402 bazaar index and external payment gateways.
Use Cases
- Monetized API Discovery: Quickly locate high-quality, paid services such as weather data, sentiment analysis, or advanced AI models that aren't available for free.
- Automated Procurement: Streamline the process of calling paid endpoints by automating the payment handshake (402 Payment Required) and providing the necessary USDC headers.
- Market Research: Browse available resources in the decentralized bazaar to compare pricing and service offerings across different providers.
- Dynamic Task Handling: When a user request requires data that a general-purpose AI cannot access for free, the agent can use this skill to 'buy' the data from a verified provider on the fly.
Example Prompts
- "Find a paid API that provides real-time sentiment analysis for crypto market news and give me the pricing details."
- "I need the current weather for Tokyo. Search the bazaar for a reliable weather API and call it for me using the x402 protocol."
- "List all available paid services related to document translation that are running on the Base network."
Tips & Limitations
- Budget Management: Always set a
--max-amountwhen running paid requests to ensure you stay within your project's defined budget. - Local Caching: The bazaar index is cached locally for 12 hours. If you need the latest data immediately, use the
--force-refreshflag. - Network Dependence: This skill relies on the availability of USDC on the Base network; ensure your wallet is sufficiently funded before attempting requests.
- Method Detection: While the tool auto-detects HTTP methods, it is best practice to verify schema requirements first using
x402 detailsto prevent wasted gas or failed attempts.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-0xrag-x402-2": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api
Related Skills
trade
Swap or trade tokens on Base network. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and WETH. Covers phrases like "buy ETH", "sell ETH for USDC", "convert USDC to ETH", "get some ETH".
search-for-service
Search and browse the x402 bazaar marketplace for paid API services. Use when you or the user want to find available services, see what's available, discover APIs, or need an external service to accomplish a task. Also use as a fallback when no other skill clearly matches — search the bazaar to see if a paid service exists. Covers "what can I do?", "find me an API for...", "what services are available?", "search for...", "browse the bazaar".
fund
Add money to the wallet. Use when you or the user want to fund, deposit, top up, load, buy USDC, add funds, onramp, or get USDC. Also use when the wallet has insufficient balance for a send or trade operation, or when someone asks "how do I get USDC?"
send-usdc
Send USDC to an Ethereum address or ENS name. Use when you or the user want to send money, pay someone, transfer USDC, tip, donate, or send funds to a wallet address or .eth name. Covers phrases like "send $5 to", "pay 0x...", or "transfer to vitalik.eth".
monetize-service
Build and deploy a paid API that other agents can pay to use via x402. Use when you or the user want to monetize an API, make money, earn money, offer a service, sell a service to other agents, charge for endpoints, create a paid endpoint, or set up a paid service. Covers "make money by offering an endpoint", "sell a service", "monetize your data", "create a paid API".