drip-openclaw-billing
v1.0.10Usage-based billing for OpenClaw and ClawHub agents with Drip run, event, and usage telemetry. Use when you need request-level traceability, OpenClaw identity endpoints, or public SDK examples for Node.js and Python.
Installation
Drip OpenClaw Billing
Use this skill when OpenClaw or ClawHub handles a request and you need usage tracking, run timelines, or billable usage attribution in Drip.
Get API keys, dashboard access, and product details at https://drippay.dev.
Choose an integration path
- Use
X-OpenClaw-Identitywith/openclaw/*for lightweight, auto-provisioned metering. - Use
DRIP_API_KEYwith/v1/*for full billing, runs, events, and usage writes.
Safety contract
- Use
pk_keys by default for runtime integrations. Reservesk_keys for trusted admin flows. - Send sanitized operational metadata only.
- Never send raw prompts, raw outputs, request or response bodies, credentials, or PII.
- Prefer hashed identifiers like
queryHashover raw user content. - Emit stable idempotency keys for retries.
SDKs
Node.js
Install: npm install @drip-sdk/node
For the OpenClaw wrapper flow, use OpenClawBilling from @drip-sdk/node/openclaw or OpenClawDripMiddleware from @drip/openclaw/middleware when you are inside the package integration.
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',
});
Python
Install: pip install drip-sdk
Use the public Python SDK when you need the same run, event, and usage lifecycle from Python.
import os
from drip import Drip
client = Drip(api_key=os.environ["DRIP_API_KEY"])
run = client.start_run(
customer_id="cus_123",
workflow_id=os.environ["DRIP_WORKFLOW_ID"],
external_run_id="openclaw_req_456",
)
Reference loading
Read references/API.md when you need:
- OpenClaw identity endpoint auth and payload shapes
- Core Drip API run, event, and usage flow
- Node.js and Python examples
- Pricing, rate limits, and outcome semantics