返回顶部
d

drip-openclaw-billing

Add usage metering and billing telemetry to OpenClaw agents using Drip. Use when you need per-run cost attribution, tool-call usage tracking, and customer-level billing visibility.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.1
安全检测
已通过
519
下载量
2
收藏
概述
安装方式
版本历史

drip-openclaw-billing

# Drip OpenClaw Billing Instrument OpenClaw agents with Drip for **run timelines**, **tool-call usage metering**, and **customer-level billing attribution**. ## Install (copy/paste) ```bash clawhub install drip-openclaw-billing ``` > Use slug only in CLI (`drip-openclaw-billing`), not `owner/slug`. ## What this gives you - Per-run billing traceability (`start_run` → events → usage → `end_run`) - Metered usage by unit (tokens, tool calls, API calls, compute time) - Customer/project-level cost and usage visibility in Drip - Idempotent writes for retry-safe telemetry ## Integration paths 1. **Recommended**: `DRIP_API_KEY` with `/v1/*` endpoints for full billing + telemetry control. 2. **Lightweight**: `OPENCLAW_IDENTITY_TOKEN` with `/openclaw/*` endpoints. ## Security rules - Use least-privilege runtime keys (prefer scoped telemetry key). - Never send raw prompts, raw model outputs, credentials, or PII. - Send sanitized metadata only (hash content fields like `queryHash` when needed). - Emit stable idempotency keys for all writes. - Validate payload schemas in staging before production rollout. ## Quickstart (Node.js) ```ts import { OpenClawBilling } from '@drip-sdk/node/openclaw'; const billing = new OpenClawBilling({ apiKey: process.env.DRIP_API_KEY, customerId: 'cus_123', workflowId: process.env.DRIP_WORKFLOW_ID ?? 'wf_openclaw', }); await billing.withRun({ externalRunId: 'openclaw_req_456' }, async ({ runId }) => { await billing.withToolCall({ runId, provider: 'brave', endpoint: '/res/v1/web/search' }, async () => { // tool execution }); }); ``` ## Quickstart (Python) ```py from drip import Drip import os client = Drip(api_key=os.environ['DRIP_API_KEY']) run = client.start_run(customer_id='cus_123', workflow_id='wf_openclaw', external_run_id='openclaw_req_456') client.emit_event(run_id=run.id, event_type='tool.call', quantity=1, metadata={'provider': 'brave'}) client.track_usage(customer_id='cus_123', meter='brave_api_calls', quantity=1, metadata={'runId': run.id}) client.end_run(run.id, status='COMPLETED') ``` ## Load detailed API docs See `references/API.md` for: - endpoint shapes - run/event/usage lifecycle - pricing units and rate-limit notes - error handling patterns

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 drip-openclaw-billing-1776278090 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 drip-openclaw-billing-1776278090 技能

通过命令行安装

skillhub install drip-openclaw-billing-1776278090

下载 Zip 包

⬇ 下载 drip-openclaw-billing v1.1.1

文件大小: 2.96 KB | 发布时间: 2026-4-16 18:33

v1.1.1 最新 2026-4-16 18:33
Security alignment update: metadata consistency fixes (owner + credential/env declarations), explicit OPENCLAW_IDENTITY_TOKEN naming, tightened privacy contract, and scanner-friendly _meta schema.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部