← 返回
数据分析 Key 中文

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-le...
使用 Drip 为OpenClaw 代理添加使用计量和计费遥测,适用于每次运行成本归因、工具调用使用追踪及客户...
lucas-309
数据分析 clawhub v1.1.1 4 版本 99782.6 Key: 需要
★ 2
Stars
📥 878
下载
💾 7
安装
4
版本
#latest

概述

Drip OpenClaw Billing

Instrument OpenClaw agents with Drip for run timelines, tool-call usage metering, and customer-level billing attribution.

Install (copy/paste)

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)

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)

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

版本历史

共 4 个版本

  • v1.1.1 当前
    2026-05-03 03:26 安全 安全
  • v1.0.10
    2026-03-29 07:37 安全 安全
  • v1.0.6
    2026-03-26 21:33
  • v1.0.9
    2026-03-18 15:10

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,926
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,005
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 367 📥 140,240