Signed usage receipts for AI systems. Patent Pending.
ProofMeter signs what an AI system used (tokens, API calls, compute), then lets authorized parties apply the correct cost view — public estimates, private contract rates, usage-only mode, or future invoice reconciliation.
npm install @proofmeter/sdkimport { ProofMeter } from '@proofmeter/sdk';
const meter = new ProofMeter({
apiKey: process.env.VS_API_KEY!,
namespaceId: process.env.VS_NAMESPACE!,
});
// Record a usage event — get a signed receipt
const receipt = await meter.spend({
provider: 'openai',
model: 'gpt-4o',
inputTokens: 1200,
outputTokens: 300,
});
console.log(receipt.receipt_id); // rcpt_7f3a...
console.log(receipt.proven_usage); // { provider, model, units, ... }
console.log(receipt.event_hash); // sha256:...
// Verify a receipt
const result = await meter.verify({ receiptId: receipt.receipt_id });
console.log(result.valid); // true- Resource usage was recorded in a structured event
- The receipt payload matches its hash and signature
- The receipt chain and sequence are intact
- The declared price book hash matches the valuation
- The provider's internal bill (unless invoice data is reconciled)
- The customer's private contract rates (unless an authorized price book is applied)
- Actual billed cost (until reconciliation is connected)
| Option | Type | Required | Description |
|---|---|---|---|
apiKey |
string |
Yes | VerifiedState API key |
namespaceId |
string |
Yes | Namespace to scope receipts |
baseUrl |
string |
No | API base URL (default: https://api.verifiedstate.com/v1) |
Record a usage event. Returns a signed SpendReceipt.
| Option | Type | Required | Description |
|---|---|---|---|
provider |
string |
Yes | Provider ID (e.g., openai, anthropic) |
model |
string |
Yes | Model name |
inputTokens |
number |
No | Input token count |
outputTokens |
number |
No | Output token count |
units |
UsageUnit[] |
No | Custom usage units (images, compute, etc.) |
endpointClass |
string |
No | Endpoint type (default: chat) |
taskId |
string |
No | Task/run ID for grouping |
capabilityId |
string |
No | Budget capability to debit |
metadata |
object |
No | Arbitrary metadata |
Verify a receipt's signature and chain integrity. Returns a VerifyResult.
List receipts for the namespace.
- Receipt Specification
- Trust Boundaries
- Verify a Receipt
- Python SDK (
pip install benchd-harness) - GitHub
MIT