← 返回 Skills 市场
obcraft

Apiosk Skill

作者 obcraft · GitHub ↗ · v1.1.0
cross-platform ⚠ suspicious
1098
总下载
0
收藏
0
当前安装
8
版本数
在 OpenClaw 中安装
/install apiosk
功能描述
Pay-per-request API gateway using USDC micropayments on Base blockchain with no API keys, supporting 15+ production APIs and simple wallet setup.
使用说明 (SKILL.md)

Apiosk - Keyless API Access with USDC Micropayments

Pay-per-request API access for agents. No API keys. No accounts. Just pay and call.

Apiosk enables agents to access production APIs using x402 protocol - USDC micropayments on Base blockchain. Stop managing API keys, start paying per request.


🎯 What This Skill Does

  • Discover APIs - Browse 9+ production APIs (weather, prices, news, geocoding, etc.)
  • Pay per request - Automatic USDC micropayments ($0.001-0.10 per call)
  • No setup - No API keys, no accounts, no subscriptions
  • Instant access - Call APIs immediately with x402 payment

📦 Installation

# Via ClawHub
clawhub install apiosk

# Or clone manually
git clone https://github.com/apiosk/apiosk-skill

⚙️ Configuration

1. Set Up Wallet (One-time)

# Generate new wallet (or import existing)
./setup-wallet.sh

# This creates ~/.apiosk/wallet.json with:
# - Private key (stored locally, chmod 600 for security)
# - Public address
# - Base mainnet RPC

**IMPORTANT:** The private key is stored in plaintext in `~/.apiosk/wallet.json` (with restrictive file permissions). Only fund this wallet with small amounts for testing. For production, use a hardware wallet or external key management.

Important: Fund your wallet with USDC on Base mainnet (minimum $1-10 recommended).

How to fund:

  1. Bridge USDC to Base via https://bridge.base.org
  2. Or buy USDC on Coinbase → withdraw to Base
  3. Send to your Apiosk wallet address

2. Discover Available APIs

# List all APIs
./list-apis.sh

# Output:
# weather       $0.001/req   Get current weather and forecasts
# prices        $0.002/req   Crypto/stock/forex prices  
# news          $0.005/req   Global news by topic/country
# company       $0.01/req    Company info, financials, news
# geocode       $0.001/req   Address → Coordinates
# ...

🚀 Usage

Basic API Call

# Call weather API
./call-api.sh weather --params '{"city": "Amsterdam"}'

# Output:
# {
#   "temperature": 12,
#   "condition": "Cloudy",
#   "forecast": [...]
# }
# 
# ✅ Paid: $0.001 USDC

From Agent Code (Node.js)

const { callApiosk } = require('./apiosk-client');

// Call weather API
const weather = await callApiosk('weather', {
  city: 'Amsterdam'
});

console.log(`Temperature: ${weather.temperature}°C`);
// ✅ Automatically paid $0.001 USDC

From Agent Code (Python)

from apiosk_client import call_apiosk

# Call prices API
prices = call_apiosk('prices', {
    'symbols': ['BTC', 'ETH']
})

print(f"BTC: ${prices['BTC']}")
# ✅ Automatically paid $0.002 USDC

📚 Available APIs

API Cost/req Description Example
weather $0.001 Weather forecasts {"city": "NYC"}
prices $0.002 Crypto/stock prices {"symbols": ["BTC"]}
news $0.005 Global news articles {"topic": "AI"}
company $0.01 Company data {"domain": "apple.com"}
geocode $0.001 Address → Coordinates {"address": "Amsterdam"}
code-runner $0.05 Execute code sandbox {"lang": "python", "code": "..."}
pdf-generator $0.02 HTML → PDF {"html": "\x3Ch1>Hi\x3C/h1>"}
web-screenshot $0.03 URL → Screenshot {"url": "example.com"}
file-converter $0.01 Convert file formats {"from": "docx", "to": "pdf"}

Full docs: https://apiosk.com/#docs


🔧 Helper Scripts

list-apis.sh

#!/bin/bash
# List all available APIs with pricing

curl -s https://gateway.apiosk.com/v1/apis | jq -r '.apis[] | "\(.id)	$\(.price_usd)/req	\(.description)"'

call-api.sh

#!/bin/bash
# Call any Apiosk API with automatic payment
# Usage: ./call-api.sh \x3Capi-id> --params '{"key":"value"}'

API_ID=$1
PARAMS=$3

# Load wallet
WALLET_ADDRESS=$(jq -r '.address' ~/.apiosk/wallet.json)

# Make request (x402 payment happens via on-chain verification)
# The gateway validates payment on-chain, no client-side signature needed
curl -X POST "https://gateway.apiosk.com/$API_ID" \
  -H "Content-Type: application/json" \
  -H "X-Wallet-Address: $WALLET_ADDRESS" \
  -d "$PARAMS"

check-balance.sh

#!/bin/bash
# Check USDC balance in your Apiosk wallet

WALLET_ADDRESS=$(jq -r '.address' ~/.apiosk/wallet.json)

curl -s "https://gateway.apiosk.com/v1/balance?address=$WALLET_ADDRESS" | jq
# Output: {"balance_usdc": 9.87, "spent_today": 0.13}

usage-stats.sh

#!/bin/bash
# View your API usage stats

WALLET_ADDRESS=$(jq -r '.address' ~/.apiosk/wallet.json)

curl -s "https://gateway.apiosk.com/v1/usage?address=$WALLET_ADDRESS" | jq
# Output:
# {
#   "total_requests": 142,
#   "total_spent_usdc": 1.89,
#   "by_api": {
#     "weather": {"requests": 87, "spent": 0.087},
#     "prices": {"requests": 55, "spent": 0.11}
#   }
# }

🎓 Examples

Example 1: Weather Bot

const { callApiosk } = require('./apiosk-client');

async function getWeatherReport(city) {
  const weather = await callApiosk('weather', { city });
  
  return `🌤️ Weather in ${city}:
Temperature: ${weather.temperature}°C
Condition: ${weather.condition}
Forecast: ${weather.forecast.map(f => f.summary).join(', ')}
  
💰 Cost: $0.001 USDC`;
}

// Usage
console.log(await getWeatherReport('Amsterdam'));

Example 2: Crypto Price Tracker

from apiosk_client import call_apiosk
import time

def track_prices(symbols, interval=60):
    """Track crypto prices with Apiosk"""
    while True:
        prices = call_apiosk('prices', {'symbols': symbols})
        
        for symbol, price in prices.items():
            print(f"{symbol}: ${price:,.2f}")
        
        print(f"✅ Paid: $0.002 USDC\
")
        time.sleep(interval)

# Track BTC and ETH every minute
track_prices(['BTC', 'ETH'])

Example 3: News Digest Agent

const { callApiosk } = require('./apiosk-client');

async function getDailyDigest(topics) {
  const articles = [];
  
  for (const topic of topics) {
    const news = await callApiosk('news', { 
      topic, 
      limit: 3 
    });
    articles.push(...news.articles);
  }
  
  return `📰 Daily Digest (${articles.length} articles)
${articles.map(a => `- ${a.title} (${a.source})`).join('\
')}

💰 Total cost: $${(topics.length * 0.005).toFixed(3)} USDC`;
}

// Get tech + business news
console.log(await getDailyDigest(['technology', 'business']));

🔐 How x402 Works

Traditional API:

1. Sign up for account
2. Get API key
3. Store securely
4. Include in requests
5. Monitor rate limits
6. Pay monthly subscription

Apiosk (x402):

1. Make request
2. Gateway returns 402 Payment Required
3. Your wallet signs payment proof
4. Gateway verifies on-chain
5. Gateway forwards to API
6. You get response

Time: Milliseconds. Cost: Exact usage. Setup: Zero.


🛠️ Advanced Configuration

Custom RPC Endpoint

# Edit ~/.apiosk/config.json
{
  "rpc_url": "https://mainnet.base.org",
  "chain_id": 8453,
  "usdc_contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}

Set Spending Limits

# Set daily spending limit
./set-limit.sh --daily 10.00

# Set per-request max
./set-limit.sh --per-request 0.10

Enable Notifications

# Get notified when balance is low
./configure.sh --alert-balance 1.00 --alert-webhook "https://hooks.slack.com/..."

📊 Monitoring & Analytics

Check Spending

# Today's spending
./usage-stats.sh --today

# This month
./usage-stats.sh --month

# Per API breakdown
./usage-stats.sh --by-api

Export Usage Data

# Export to CSV for accounting
./export-usage.sh --start 2026-01-01 --end 2026-01-31 --format csv > january_usage.csv

🆘 Troubleshooting

"Insufficient USDC balance"

# Check balance
./check-balance.sh

# If low, fund your wallet:
# 1. Bridge USDC to Base: https://bridge.base.org
# 2. Send to: [your wallet address]

"Payment verification failed"

# Verify wallet signature is working
./test-signature.sh

# If fails, regenerate wallet:
./setup-wallet.sh --regenerate

"API not found"

# Refresh API list
./list-apis.sh --refresh

# Check if API is available
curl https://gateway.apiosk.com/v1/apis | jq '.apis[] | select(.id=="weather")'

🌐 For Developers: Add Your Own API

Want to monetize your API via Apiosk?

# 1. Sign up
curl -X POST https://dashboard.apiosk.com/api/register \
  -d '{"email":"[email protected]","api_name":"My API"}'

# 2. Add your API endpoint
curl -X POST https://dashboard.apiosk.com/api/add \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "name": "my-api",
    "endpoint": "https://my-api.com",
    "price_usd": 0.01,
    "description": "My awesome API"
  }'

# 3. Start earning!
# Agents call your API via Apiosk gateway
# You get 90-95% of revenue, automatically

More: https://docs.apiosk.com/developers


📖 Resources


💡 Why Apiosk?

For Agents:

  • ✅ No API key management
  • ✅ Pay only what you use
  • ✅ Access 9+ APIs instantly
  • ✅ Transparent pricing
  • ✅ On-chain payment proofs

For Developers:

  • ✅ Monetize any API
  • ✅ No payment processing
  • ✅ 90-95% revenue share
  • ✅ Instant settlement
  • ✅ Global reach

Network effect: More APIs → More agents → More revenue → More APIs


🦞 About

Built by the Apiosk team for the agent economy.

x402 protocol: Keyless API access with crypto micropayments.
Mission: Make every API instantly accessible to every agent.

"Stop managing API keys. Start paying per request."


📝 License

MIT - Use freely in your agents!


🔗 Quick Links

# Install
clawhub install apiosk

# Setup
cd ~/.openclaw/skills/apiosk && ./setup-wallet.sh

# Use
./call-api.sh weather --params '{"city": "Amsterdam"}'

# Monitor
./usage-stats.sh

Happy building! 🚀

安全使用建议
Before installing, consider the following: 1) This skill stores a wallet private key in plaintext in ~/.apiosk/wallet.json (chmod 600). Do not use it for significant funds — prefer a hardware wallet or external KMS for production. 2) The skill's metadata omits required system tools (cast/Foundry, curl, jq, bc) even though the docs and scripts rely on them; validate and install those tools yourself from trusted sources rather than running piped installer commands. 3) The docs instruct installing Foundry via curl | bash — avoid piping remote scripts without review. 4) Verify the gateway URL (https://gateway.apiosk.com) and the project repository/website before funding any wallet; the SKILL.md README and package.json point to different repo URLs which is a red flag. 5) Test with a tiny amount ( <$5 USDC ) first, monitor usage with the provided scripts, and review the code (especially any network calls) to confirm no private key or other secrets are transmitted. 6) If you need production-level guarantees, request or require integration with hardware wallets/KMS and a professional security audit. If you are unsure about the gateway's provenance or the repository authenticity, avoid installing.
功能分析
Type: OpenClaw Skill Name: apiosk Version: 1.1.0 The skill is classified as suspicious due to critical vulnerabilities, primarily the storage of the wallet's private key in plaintext within `~/.apiosk/wallet.json`. Although this risk is explicitly disclosed and warned against in `SKILL.md`, `README.md`, and `SECURITY.md`, and file permissions are set to `chmod 600`, it remains a high-risk design choice. Additionally, the `call-api.sh` script directly uses the `$PARAMS` variable in a `curl -d "$PARAMS"` command, which could create a shell injection vulnerability if an AI agent were to construct or pass unsanitized input from a user, potentially leading to arbitrary command execution. There is no clear evidence of intentional malicious behavior such as hidden data exfiltration, persistence mechanisms, or stealthy prompt injection against the agent.
能力评估
Purpose & Capability
The skill's name/description (keyless, USDC micropayments on Base) aligns with the included scripts and clients that contact a gateway and perform payments using a local wallet. However 'keyless' is misleading: the skill requires generating and storing a private key locally and funding a wallet. The metadata declares no required binaries or env vars even though the scripts depend on tools (cast/Foundry, curl, jq, bc). The README/SKILL.md claim 9+ vs '15+' APIs and link to multiple hostnames; the package.json repository URL differs from the SKILL.md git clone URL — these mismatches reduce trust.
Instruction Scope
Runtime instructions explicitly direct creating ~/.apiosk/wallet.json that contains the private key in plaintext (chmod 600 recommended) and to fund it with USDC. The SKILL.md and scripts use only the wallet address when talking to the gateway, but the code and scripts do load the private_key field locally (call-api.sh reads it into a shell variable) — the private key is never sent in the provided code, but storing it unencrypted and invoking remote installers or tools increases risk. The skill also instructs installing Foundry via a curl | bash command (remote installer) and to call gateway.apiosk.com and Base RPC endpoints; there are no instructions to verify gateway ownership or TLS fingerprints.
Install Mechanism
There is no formal install specification (instruction-only), so nothing would be written by an installer automatically. However the documentation advises running an external installer (Foundry) via curl | bash (paradigm.xyz), and the scripts assume system tools (cast, curl, jq, bc). The absence of declared required binaries in the skill metadata is inconsistent with the documented requirements. No downloaded archives or obscure hosts are embedded in the skill itself.
Credentials
The skill declares no required environment variables or primary credentials, yet it requires creation and local storage of a private key in plaintext and relies on system binaries. That private key is effectively a sensitive credential; the skill does not provide safe defaults for secure key management (hardware wallet / KMS integration is only recommended for production). Scripts read only ~/.apiosk/* files (no other system creds), which is good, but the lack of explicit metadata declaring the need for Foundry/cast/jq/curl is an incoherence and a deployment hazard.
Persistence & Privilege
The skill is not always:true and does not request permanent platform-wide privileges or modify other skills. It stores its own config and wallet under ~/.apiosk, which is normal for a local utility. There is no evidence it attempts to persist beyond its own directory or to alter other agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install apiosk
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /apiosk 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Fix: corrected API URL path (/api/ID -> /ID) to match gateway routes in call-api.sh, apiosk-client.js, apiosk_client.py
v1.2.0
Removed all Foundry/cast references. On-chain balance uses ethers.js. Declared required binaries (node, jq, curl) in manifest. No curl|bash anywhere.
v1.0.5
v1.0.5: Replaced Foundry (curl|bash) with ethers.js for wallet generation. Proper Ethereum keypair with local private key storage (chmod 600). No external installers required.
v1.0.4
Removed Foundry dependency (no more curl|bash install). Removed private key storage — wallet.json now stores address only. Zero external dependencies beyond Node.js, curl, and jq.
v1.0.3
v1.0.3 - Security & Transparency Improvements: - Fixed: Removed unused private key code from call-api.sh - Added: clawhub.json with declared dependencies (jq, curl, cast, bc) - Added: Clear explanation of why private key exists but isn't sent to gateway - Added: Detailed payment verification flow documentation - Improved: Security warnings and setup requirements - Clarified: Private key is for future use (withdrawals/refunds), not current API calls
v1.0.2
v1.0.2 - Security & Documentation Improvements: - Fixed: Honest documentation about setup requirements (removed "no setup" claims) - Fixed: Consistent GitHub repository URLs (olivierbrinkman/apiosk-skill) - Fixed: Clear description of wallet security (plaintext storage with warnings) - Added: Comprehensive SECURITY.md with risk disclosure - Added: Manual Foundry installation (removed auto-installer) - Updated: API count to 15+ (reflects actual production APIs)
v1.0.1
Security improvements (v1.0.1): - Fixed: Removed incorrect "encrypted" claim - wallet.json is plaintext - Fixed: Documentation now matches actual implementation - Fixed: Foundry installation is now manual (safer) - Added: SECURITY.md with detailed security guidance - Added: Security warnings in README - Improved: Honest documentation about risks
v1.0.0
Initial release of Apiosk AgentSkill Features: - Access 15+ production APIs with zero setup - Pay per request ($0.001-0.10 USDC) - No API keys, no accounts, no subscriptions - Automatic x402 micropayments on Base - Includes: weather, prices, news, geocoding, code execution, PDF generation, web screenshots, file conversion, and more Quick start: 1. clawhub install apiosk 2. cd ~/.openclaw/skills/apiosk && ./setup-wallet.sh 3. Fund wallet with USDC on Base 4. ./call-api.sh weather --params '{"city":"Amsterdam"}' Docs: https://apiosk.com
元数据
Slug apiosk
版本 1.1.0
许可证
累计安装 0
当前安装数 0
历史版本数 8
常见问题

Apiosk Skill 是什么?

Pay-per-request API gateway using USDC micropayments on Base blockchain with no API keys, supporting 15+ production APIs and simple wallet setup. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1098 次。

如何安装 Apiosk Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install apiosk」即可一键安装,无需额外配置。

Apiosk Skill 是免费的吗?

是的,Apiosk Skill 完全免费(开源免费),可自由下载、安装和使用。

Apiosk Skill 支持哪些平台?

Apiosk Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Apiosk Skill?

由 obcraft(@obcraft)开发并维护,当前版本 v1.1.0。

💬 留言讨论