{
  "schemaVersion": "1.0",
  "item": {
    "slug": "metered-api-marketplace",
    "name": "Metered API Marketplace",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/arshingleton/metered-api-marketplace",
    "canonicalUrl": "https://clawhub.ai/arshingleton/metered-api-marketplace",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/metered-api-marketplace",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=metered-api-marketplace",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/api_reference.md",
      "references/billing_ledger.md",
      "references/integration_prompt.md",
      "references/providers.md",
      "scripts/nextjs-starter/README_DEPLOY.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/metered-api-marketplace"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/metered-api-marketplace",
    "agentPageUrl": "https://openagent3.xyz/skills/metered-api-marketplace/agent",
    "manifestUrl": "https://openagent3.xyz/skills/metered-api-marketplace/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/metered-api-marketplace/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Metered API Marketplace",
        "body": "Provide a production-lean template for: OpenClaw Skill → Public API Endpoint → Usage Metering → Crypto Payment Gateway → BTC/ETH wallets.\n\nThis skill ships a runnable reference server (Fastify + SQLite) that:\n\nAccepts structured JSON input\nPerforms a high-value transformation (pluggable “transformers”)\nReturns structured JSON output\nEnforces signed API key auth\nChecks prepaid balance, deducts per call, and logs usage\nAccepts payment webhooks (Coinbase Commerce / BTCPay Server style)\nApplies a 2.5% platform fee in the ledger (fee addresses configurable)"
      },
      {
        "title": "1) Pick the productized capability (the thing people pay for)",
        "body": "Choose ONE transformer that is:\n\nhigh leverage (makes/keeps money)\nrepeatable (called often)\ndefensible (data, heuristics, workflow, or automation — not “generic summarization”)\n\nGood defaults:\n\nrevenue/offer optimizer\nad copy optimizer\nlead scoring\ncontract risk flags\n\nIf unclear, start with the included revenue-amplifier transformer and replace it later."
      },
      {
        "title": "2) Run the reference server locally",
        "body": "Use the bundled server in scripts/server/.\n\nTypical run:\n\ncd scripts/server\nnpm install\ncp .env.example .env and edit\nnpm run dev\n\nSet flat launch pricing in .env:\n\nCOST_CENTS_PER_CALL=25  # $0.25/call"
      },
      {
        "title": "3) Create an API key",
        "body": "Use scripts/server/admin/create_key_pg.js (or the admin HTTP endpoint) to create a key and starting balance."
      },
      {
        "title": "4) Integrate from an OpenClaw skill / agent",
        "body": "Call the public endpoint with:\n\nx-api-key\nx-timestamp (unix ms)\nx-signature = hex(HMAC_SHA256(api_secret, ${timestamp}.${rawBody}))"
      },
      {
        "title": "5) Add real payments",
        "body": "Wire a payment processor webhook to /v1/payments/webhook/:provider.\n\nProviders are adapter-based:\n\nstart with “manual” credits (admin script)\nthen add Coinbase Commerce or BTCPay Server"
      },
      {
        "title": "6) Ship",
        "body": "Deploy behind TLS (Cloudflare / Fly.io / Render / AWS / GCP). Put rate limiting at the edge + in-app."
      },
      {
        "title": "scripts/server/",
        "body": "Runnable reference implementation:\n\nFastify API server (long-running)\nPostgres ledger (balances, usage, credits)\nSigned API key auth\nRate limiting + basic anti-abuse\nWebhook endpoint(s)"
      },
      {
        "title": "scripts/nextjs-starter/",
        "body": "Vercel-ready Next.js API implementation:\n\nServerless API routes (no listen())\nPostgres ledger (Supabase Transaction Pooler recommended)\nSame auth + pricing + webhook concepts"
      },
      {
        "title": "references/",
        "body": "Read only when needed:\n\nreferences/api_reference.md – endpoint contracts + auth/signing\nreferences/billing_ledger.md – pricing, fee logic, idempotency\nreferences/providers.md – provider adapters (Coinbase/BTCPay patterns)"
      }
    ],
    "body": "Metered API Marketplace\n\nProvide a production-lean template for: OpenClaw Skill → Public API Endpoint → Usage Metering → Crypto Payment Gateway → BTC/ETH wallets.\n\nThis skill ships a runnable reference server (Fastify + SQLite) that:\n\nAccepts structured JSON input\nPerforms a high-value transformation (pluggable “transformers”)\nReturns structured JSON output\nEnforces signed API key auth\nChecks prepaid balance, deducts per call, and logs usage\nAccepts payment webhooks (Coinbase Commerce / BTCPay Server style)\nApplies a 2.5% platform fee in the ledger (fee addresses configurable)\nWorkflow (do this in order)\n1) Pick the productized capability (the thing people pay for)\n\nChoose ONE transformer that is:\n\nhigh leverage (makes/keeps money)\nrepeatable (called often)\ndefensible (data, heuristics, workflow, or automation — not “generic summarization”)\n\nGood defaults:\n\nrevenue/offer optimizer\nad copy optimizer\nlead scoring\ncontract risk flags\n\nIf unclear, start with the included revenue-amplifier transformer and replace it later.\n\n2) Run the reference server locally\n\nUse the bundled server in scripts/server/.\n\nTypical run:\n\ncd scripts/server\nnpm install\ncp .env.example .env and edit\nnpm run dev\n\nSet flat launch pricing in .env:\n\nCOST_CENTS_PER_CALL=25 # $0.25/call\n3) Create an API key\n\nUse scripts/server/admin/create_key_pg.js (or the admin HTTP endpoint) to create a key and starting balance.\n\n4) Integrate from an OpenClaw skill / agent\n\nCall the public endpoint with:\n\nx-api-key\nx-timestamp (unix ms)\nx-signature = hex(HMAC_SHA256(api_secret, ${timestamp}.${rawBody}))\n5) Add real payments\n\nWire a payment processor webhook to /v1/payments/webhook/:provider.\n\nProviders are adapter-based:\n\nstart with “manual” credits (admin script)\nthen add Coinbase Commerce or BTCPay Server\n6) Ship\n\nDeploy behind TLS (Cloudflare / Fly.io / Render / AWS / GCP). Put rate limiting at the edge + in-app.\n\nBundled resources\nscripts/server/\n\nRunnable reference implementation:\n\nFastify API server (long-running)\nPostgres ledger (balances, usage, credits)\nSigned API key auth\nRate limiting + basic anti-abuse\nWebhook endpoint(s)\nscripts/nextjs-starter/\n\nVercel-ready Next.js API implementation:\n\nServerless API routes (no listen())\nPostgres ledger (Supabase Transaction Pooler recommended)\nSame auth + pricing + webhook concepts\nreferences/\n\nRead only when needed:\n\nreferences/api_reference.md – endpoint contracts + auth/signing\nreferences/billing_ledger.md – pricing, fee logic, idempotency\nreferences/providers.md – provider adapters (Coinbase/BTCPay patterns)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/arshingleton/metered-api-marketplace",
    "publisherUrl": "https://clawhub.ai/arshingleton/metered-api-marketplace",
    "owner": "arshingleton",
    "version": "0.1.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/metered-api-marketplace",
    "downloadUrl": "https://openagent3.xyz/downloads/metered-api-marketplace",
    "agentUrl": "https://openagent3.xyz/skills/metered-api-marketplace/agent",
    "manifestUrl": "https://openagent3.xyz/skills/metered-api-marketplace/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/metered-api-marketplace/agent.md"
  }
}