搜索

PythonReactSEOPDF
OpenClaw

x402engine

Pay-per-call API gateway skill — calls 63 APIs (LLMs, image/video gen, flights, hotels, crypto, web search) via x402 micropayments. Each call costs $0.001-$0.60 in USDC/USDm, enforced by a local policy engine with spend caps.

agentc220 来源安装数☆ 0 仓库 Starsv1.3.2

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install agentc22/x402engine

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

x402engine

Call 63 paid APIs via x402 micropayments. Each API call costs between $0.001 and $0.60, paid with USDC on Base/Solana or USDm on MegaETH.

What this skill does

This skill signs and submits stablecoin micropayments to call remote APIs on the user's behalf. It uses the EVM_PRIVATE_KEY environment variable to sign on-chain payment transactions. Each call deducts a small amount from the wallet.

Cost transparency: When presenting results, include the cost of the call (e.g. "Bitcoin is $97,500 (cost: $0.001)"). If the user asks about spending, show full budget breakdown.

Triggers

  • "what's the price of bitcoin"
  • "ethereum price"
  • "show me trending crypto"
  • "generate an image of a sunset"
  • "run this python code"
  • "transcribe this audio"
  • "wallet activity of vitalik.eth"
  • "ask gpt to explain x402"
  • "scrape this url"
  • "pin this to ipfs"
  • "resolve vitalik.eth"
  • "flights from JFK to LAX"
  • "search hotels in Paris"
  • "find cheap flights to Tokyo"
  • "how much budget is left"
  • "list available services"

How it works

  1. Fetch cached service catalog from discovery endpoint (default: https://x402engine.app/.well-known/x402.json).
  2. Score query against 63 service descriptions to find best match.
  3. Run policy preflight — check per-tx caps, daily caps, and recipient allowlist before signing.
  4. Call service via @x402/fetch — handles 402 payment flow automatically.
  5. Return structured data to the agent for natural-language presentation.

Rules

  • Present results naturally. Include the cost of each call so the user knows what was spent.
  • If a payment fails due to insufficient funds, tell the user: "I need funds to access this service. Add USDC to your wallet to continue."
  • If no matching service is found, say so plainly — don't expose internal routing details.
  • Policy limits are authoritative — do not bypass spend caps or recipient allowlists.
  • Keep all decisions explainable with reason codes internally.

Security

Required creden...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/agentc22/x402engine
Version
1.3.2
Commit
17be3b8652f2fc3b0b58714abc1b5fe8f14417d7
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

x402engine Skill — Invisible Service Access Layer

Answers user questions by transparently calling 70+ paid APIs via x402 micropayments. The user sees answers, not payments.

Architecture

User: "what's the price of bitcoin"
  → discovery.js: fetch cached service catalog from /.well-known/x402.json
  → intent-router.js: score query against service descriptions → match "crypto-price"
  → client.js: @x402/fetch handles 402 → signs payment → retries automatically
  → policy-engine.js: autopreflight checks spend caps before payment signs
  → executor.js: returns { ok: true, data: { bitcoin: { usd: 97500 } } }
  → Agent says: "Bitcoin is currently $97,500."
  → User never sees x402/payment/USDC mentioned

Setup

cd skills/x402engine
npm install

Required environment:

  • EVM_PRIVATE_KEY — funded EVM wallet private key (Base USDC or MegaETH USDm)

Optional:

  • X402_POLICY_PATH — custom policy file (default: POLICY.example.json)
  • X402_STATE_PATH — daily spend tracking file
  • X402_DISCOVERY_URL — override discovery endpoint
  • X402ENGINE_ORIGIN — override API base URL
  • X402_AUTOPREFLIGHT — enable/disable policy preflight (default: true)

CLI

# List all available services from the catalog
node ./cli.js discover

# Show remaining daily budget
node ./cli.js budget

Supported services (70+)

Crypto: price feeds, market data, history, trending, search Wallet: balances, transactions across 20+ chains Image: fast (FLUX), quality (FLUX.2 Pro), text-in-image (Ideogram) Video: fast, quality, animation, Hailuo premium LLM: GPT-4o, Claude, Gemini, DeepSeek, Llama, Grok, Qwen, Mistral, Perplexity, and more Code: sandboxed execution (Python, JS, Bash, R) Audio: transcription (Deepgram), TTS (OpenAI, ElevenLabs) Web: scraping, screenshots Storage: IPFS pin/get ENS: resolve, reverse lookup Embeddings: text embeddings for semantic search

Payment rails

  • Base (eip155:8453...

来源内容

SKILL.md
# x402engine

Call 63 paid APIs via x402 micropayments. Each API call costs between $0.001 and $0.60, paid with USDC on Base/Solana or USDm on MegaETH.

## What this skill does

This skill signs and submits stablecoin micropayments to call remote APIs on the user's behalf. It uses the EVM_PRIVATE_KEY environment variable to sign on-chain payment transactions. Each call deducts a small amount from the wallet.

**Cost transparency:** When presenting results, include the cost of the call (e.g. "Bitcoin is $97,500 (cost: $0.001)"). If the user asks about spending, show full budget breakdown.

## Triggers
- "what's the price of bitcoin"
- "ethereum price"
- "show me trending crypto"
- "generate an image of a sunset"
- "run this python code"
- "transcribe this audio"
- "wallet activity of vitalik.eth"
- "ask gpt to explain x402"
- "scrape this url"
- "pin this to ipfs"
- "resolve vitalik.eth"
- "flights from JFK to LAX"
- "search hotels in Paris"
- "find cheap flights to Tokyo"
- "how much budget is left"
- "list available services"

## How it works
1. Fetch cached service catalog from discovery endpoint (default: https://x402engine.app/.well-known/x402.json).
2. Score query against 63 service descriptions to find best match.
3. Run policy preflight — check per-tx caps, daily caps, and recipient allowlist before signing.
4. Call service via @x402/fetch — handles 402 payment flow automatically.
5. Return structured data to the agent for natural-language presentation.

## Rules
- Present results naturally. Include the cost of each call so the user knows what was spent.
- If a payment fails due to insufficient funds, tell the user: "I need funds to access this service. Add USDC to your wallet to continue."
- If no matching service is found, say so plainly — don't expose internal routing details.
- Policy limits are authoritative — do not bypass spend caps or recipient allowlists.
- Keep all decisions explainable with reason codes internally.

## Security

### Required creden...
README
# x402engine Skill — Invisible Service Access Layer

Answers user questions by transparently calling 70+ paid APIs via x402 micropayments. The user sees answers, not payments.

## Architecture

```
User: "what's the price of bitcoin"
  → discovery.js: fetch cached service catalog from /.well-known/x402.json
  → intent-router.js: score query against service descriptions → match "crypto-price"
  → client.js: @x402/fetch handles 402 → signs payment → retries automatically
  → policy-engine.js: autopreflight checks spend caps before payment signs
  → executor.js: returns { ok: true, data: { bitcoin: { usd: 97500 } } }
  → Agent says: "Bitcoin is currently $97,500."
  → User never sees x402/payment/USDC mentioned
```

## Setup

```bash
cd skills/x402engine
npm install
```

**Required environment:**
- `EVM_PRIVATE_KEY` — funded EVM wallet private key (Base USDC or MegaETH USDm)

**Optional:**
- `X402_POLICY_PATH` — custom policy file (default: `POLICY.example.json`)
- `X402_STATE_PATH` — daily spend tracking file
- `X402_DISCOVERY_URL` — override discovery endpoint
- `X402ENGINE_ORIGIN` — override API base URL
- `X402_AUTOPREFLIGHT` — enable/disable policy preflight (default: `true`)

## CLI

```bash
# List all available services from the catalog
node ./cli.js discover

# Show remaining daily budget
node ./cli.js budget
```

## Supported services (70+)

**Crypto:** price feeds, market data, history, trending, search
**Wallet:** balances, transactions across 20+ chains
**Image:** fast (FLUX), quality (FLUX.2 Pro), text-in-image (Ideogram)
**Video:** fast, quality, animation, Hailuo premium
**LLM:** GPT-4o, Claude, Gemini, DeepSeek, Llama, Grok, Qwen, Mistral, Perplexity, and more
**Code:** sandboxed execution (Python, JS, Bash, R)
**Audio:** transcription (Deepgram), TTS (OpenAI, ElevenLabs)
**Web:** scraping, screenshots
**Storage:** IPFS pin/get
**ENS:** resolve, reverse lookup
**Embeddings:** text embeddings for semantic search

## Payment rails

- **Base** (eip155:8453...

相关技能

OpenClaw

ai-maestro

23blocks-os

AI Agent Orchestrator with Skills System - Give AI Agents superpowers: memory search, code graph queries, agent-to-agent messaging. Manage Claude, Codex or any AI Agent from one dashboard. Move Agents between c...

OpenClaw

registry-broker-skills

hashgraph-online

AI agent skills for the Universal Registry - search, chat, and register 72,000+ agents across 14+ protocols. Works with Claude, Codex, Cursor, OpenClaw, and any AI assistant.

OpenClaw

skills-manager

rito-w

A cross-platform skills manager for AI IDEs. Search marketplace, download locally, and install to Claude, Cursor, Windsurf, and more with one click.