返回 Skill 列表
extension
分类: 开发与工程需要 API Key

SkillPay

为 OpenClaw 技能添加积分支付功能,支持注册付费技能、按次收费、收益追踪及 USDC 提现。适用于技能变现场景。

person作者: adjusternwachukwu-bothubclawhub

SkillPay — Credits for the Agent Economy

Universal payment system for OpenClaw skills. Builders register paid skills, users buy credits, skills charge per call.

Setup

API base: https://skillpay.gpupulse.dev/api/v1

For Users (Buyers)

Register

curl -X POST "$BASE/user/register" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent", "email": "optional@email.com"}'

Returns sp_usr_... API key (save it, shown once).

Buy Credits

curl -X POST "$BASE/user/deposit" \
  -H "Authorization: Bearer sp_usr_..." \
  -H "Content-Type: application/json" \
  -d '{"amount": 100}'

Check Balance

curl "$BASE/user/balance" -H "Authorization: Bearer sp_usr_..."

For Builders (Sellers)

Register as Builder

curl -X POST "$BASE/builder/register" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-company", "wallet_address": "SolanaWalletAddress"}'

Returns sp_bld_... API key.

Register a Paid Skill

curl -X POST "$BASE/builder/skill/register" \
  -H "Authorization: Bearer sp_bld_..." \
  -H "Content-Type: application/json" \
  -d '{"slug": "my-skill", "name": "My Skill", "description": "Does something useful", "price_credits": 10}'

Check Earnings

curl "$BASE/builder/earnings" -H "Authorization: Bearer sp_bld_..."

Withdraw

curl -X POST "$BASE/builder/withdraw" \
  -H "Authorization: Bearer sp_bld_..." \
  -H "Content-Type: application/json" \
  -d '{"amount": 50}'

Integration (The Key Part)

Add this to your skill's code to charge per call:

import requests

def charge_user(user_key, skill_slug="my-skill"):
    resp = requests.post("https://skillpay.gpupulse.dev/api/v1/pay", json={
        "user_key": user_key,
        "skill_slug": skill_slug
    })
    if resp.status_code == 200:
        return True  # paid, execute skill
    elif resp.status_code == 402:
        return False  # insufficient credits
    return False

Browse Skills

curl "$BASE/skills"  # no auth needed — public catalog of all paid skills

Platform Fee

2.5% on every transaction. Builder sets price in credits, receives 97.5%.

Credit Ratio

1 USDC = 1 credit (adjustable per skill type).