返回顶部
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
安全检测
已通过
543
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

drip-openclaw-billing

技能名称: drip-openclaw-billing
详细描述:

Drip OpenClaw 计费

为 OpenClaw 代理集成 Drip,实现运行时间线工具调用用量计量客户级计费归属

安装(复制/粘贴)

bash
clawhub install drip-openclaw-billing

在 CLI 中仅使用标识符(drip-openclaw-billing),而非 owner/slug。

功能特性

  • - 每次运行的计费可追溯性(startrun → 事件 → 用量 → endrun)
  • 按单位计量用量(令牌、工具调用、API 调用、计算时间)
  • 在 Drip 中查看客户/项目级别的成本和用量
  • 幂等写入,确保遥测数据重试安全

集成方式

  1. 1. 推荐方案:使用 DRIPAPIKEY 配合 /v1/ 端点,实现完整计费与遥测控制。
  2. 轻量方案:使用 OPENCLAWIDENTITYTOKEN 配合 /openclaw/ 端点。

安全规则

  • - 使用最小权限运行时密钥(优先使用作用域限定的遥测密钥)。
  • 切勿发送原始提示词、原始模型输出、凭据或个人身份信息。
  • 仅发送经过清理的元数据(必要时对内容字段如 queryHash 进行哈希处理)。
  • 对所有写入操作使用稳定的幂等键。
  • 在生产环境部署前,先在预发布环境验证负载模式。

快速入门(Node.js)

ts
import { OpenClawBilling } from @drip-sdk/node/openclaw;

const billing = new OpenClawBilling({
apiKey: process.env.DRIPAPIKEY,
customerId: cus_123,
workflowId: process.env.DRIPWORKFLOWID ?? wf_openclaw,
});

await billing.withRun({ externalRunId: openclawreq456 }, async ({ runId }) => {
await billing.withToolCall({ runId, provider: brave, endpoint: /res/v1/web/search }, async () => {
// 工具执行
});
});

快速入门(Python)

py
from drip import Drip
import os

client = Drip(apikey=os.environ[DRIPAPI_KEY])
run = client.startrun(customerid=cus123, workflowid=wfopenclaw, externalrunid=openclawreq_456)
client.emitevent(runid=run.id, event_type=tool.call, quantity=1, metadata={provider: brave})
client.trackusage(customerid=cus123, meter=braveapi_calls, quantity=1, metadata={runId: run.id})
client.end_run(run.id, status=COMPLETED)

加载详细 API 文档

参见 references/API.md,了解:

  • - 端点结构
  • 运行/事件/用量生命周期
  • 定价单位和速率限制说明
  • 错误处理模式

标签

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

下载

⬇ 下载 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-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部