Skip to content

Design partner kit — Verifiable API billing

Goal: when two companies disagree about machine-generated usage or charges, the default answer is: “Show me the QuantZK receipt.”

This kit is outbound-ready for OpenMeter / LiteLLM / usage-billing design partners. It does not lead with VDI worldview or Groth16.

One-sentence pitch

QuantZK turns a metered API event into a portable, independently verifiable billing receipt — so disputes resolve from cryptography, not CSV dumps.

Mental model (what they integrate)

text
meter event  →  QuantZK  →  verifiable receipt (.qzk)
js
import { QuantZK } from '@quantzk/sdk';

const qzk = new QuantZK({
  baseUrl: 'https://api.quantzk.com',
  attestSecret: process.env.QUANTZK_ATTEST_SECRET,
});

const receipt = await qzk.record({
  eventId,
  customerId,
  units,
  price: 0.00012,
});

// Hand the customer billing-receipt.qzk — they verify without logging into you:
//   npx @quantzk/verify billing-receipt.qzk

Everything underneath (Postgres accept, BullMQ prove, leases, ZK, transparency) is infrastructure — not their job.

Why now (buyer objection already answered)

ObjectionStatus
“ZK will destroy my API latency”Retired. Durable accept is Postgres-backed HTTP 202; prove runs on a worker. Live smoke: accept ~100ms, job completes with one stable receipt.
“We’d have to trust QuantZK forever”Offline verify: npx @quantzk/verify / browser verifier — historical crypto remains checkable without QuantZK online.
“Too crypto-heavy to integrate”SDK is record / verify. No Poseidon / circuit ceremony in the integrator path.

Evidence links (share with technical buyers):

  • Live async Railway smoke: protocol/docs/api-billing-async-live-smoke-evidence.md
  • Local chaos (worker kill + Redis obliterate): protocol/docs/api-billing-async-chaos-evidence.md
  • Pilot HTTP path: protocol/docs/api-billing-pilot.md

Quantified ROI worksheet (fill with partner)

Use blank → measured. Example framing (replace with real numbers):

MetricBefore QuantZKAfter QuantZKNotes
Billing disputes / month______Same inflow OK
Avg investigation time___ hrs___ minTarget: receipt-first
Reconciliation labor / month$___$___Primary ROI line
Disputes resolved without raw logs___%___%Privacy + procurement win
Enterprise asks for raw provider logs______Should drop

Story to close: you’re not selling cryptography — you’re selling fewer hours and less raw-log disclosure per dispute.

Blank calculator (rough):

text
monthly_savings ≈
  (hours_before - hours_after) × fully_loaded_cost_per_hour
  + avoided_goodwill / chargeback leakage (if measured)

2-week pilot checklist

Week 0 — access

  • [ ] Partner sandbox API URL + X-VDI-Attest-Secret (or DEMO path)
  • [ ] Meter key if they sign envelopes externally (VDI_BILLING_METER_TRUST_JSON)
  • [ ] Success criteria agreed (e.g. “export .qzk; customer verifies offline”; or “async p95 accept < 50–100ms”)

Week 1 — integrate

  • [ ] Emit one production-shaped event via @quantzk/sdk record() or LiteLLM callback (integrations/litellm-quantzk)
  • [ ] Persist billing-receipt.qzk beside invoice line items
  • [ ] Partner finance/security person runs npx @quantzk/verify receipt.qzk
  • [ ] Confirm receipt answers: what happened, tariff, charge, signatures, revoke clear

Week 2 — dispute drill

  • [ ] Pick 1–3 historical or staged disputes
  • [ ] Resolve from receipt only (no raw log dump) where possible
  • [ ] Fill ROI worksheet with measured times
  • [ ] Decision: expand / pause / change integration surface

Discovery questions (use on first call)

  1. When a customer disputes usage-based charges, what artifacts do you send today?
  2. How many hours does a typical reconciliation take? Who does it (support / finance / eng)?
  3. Do enterprise customers demand raw logs you would rather not disclose?
  4. Where does metering live today (OpenMeter, Metronome, Orb, LiteLLM, homegrown)?
  5. Who must accept evidence — customer eng, auditor, or both?

What not to pitch first

  • Broader VDI / “machine decisions” platform story
  • MPC ceremony details
  • Internal test suite percentages

Lead with: “Your customer disputes an API bill. Can either party independently prove what happened?”

Package contents

ArtifactPath
SDKprotocol/packages/sdk
Offline CLIprotocol/packages/verify-cli
LiteLLM adapterintegrations/litellm-quantzk
Receipt specprotocol/docs/qzr-1.md
Independent review prepprotocol/docs/independent-review-prep.md
Async live evidenceprotocol/docs/api-billing-async-live-smoke-evidence.md

Ask

A 2-week pilot on a single high-volume endpoint or a frozen dispute sample set — with permission to publish anonymized before/after reconciliation times.

Verification keys are embedded in attestations. Verify offline. No QuantZK servers required.