Documentation
Network · Receipts
Inference receipts
An inference receipt is a deterministic, auditable accounting record for a job — what model ran, how many tokens it billed, what was charged, and what reward accrued. It is billing evidence, not a claim about the world.
What a receipt is
Every completed or failed inference job produces a receipt. It records the deterministic economic outcome of that job in $BASIS base units so the charge, the protocol fee, and the worker reward can be recomputed and checked.
Accounting, not verification
A receipt is an accounting record. It is not a verdict, a rating, or a verification of any claim. It states what was billed and what was paid for a single job — nothing more.
Receipt fields
The economic core below is immutable and is what the receiptHash is computed over. All raw amounts are $BASIS base units carried as decimal strings.
Economic core (hashed)
| Field | Type | Notes |
|---|---|---|
| receiptVersion | number | Schema version of the receipt. |
| jobId | string | Unique business key for the job. Duplicates are rejected. |
| userId | string | null | Identifier for the caller, if known. |
| userWallet | string | null | Caller's wallet, if supplied. |
| workerId | string | The worker that served the job. |
| workerWallet | string | Worker's EVM reward address (empty for gateway-served jobs). |
| modelId | string | Model served, e.g. basis-default. |
| promptTokens | number | Prompt tokens billed. |
| outputTokens | number | Output tokens billed. |
| latencyMs | number | Observed latency in milliseconds. |
| qualityBps | number | Quality factor in bps. |
| uptimeBps | number | Worker uptime factor in bps. |
| latencyBps | number | Latency factor in bps. |
| modelMultiplierBps | number | Pricing multiplier in bps (10000 = 1x). |
| totalChargedRaw | string | Total charged, in $BASIS base units. |
| workerRewardRaw | string | Worker reward, in $BASIS base units. |
| protocolFeeRaw | string | Protocol fee, in $BASIS base units. |
| tokenSymbol | string | BASIS. |
| tokenAddress | string | Empty while the token is pending deployment. |
| chainId | number | Base chain id (8453). |
| createdAt | string | ISO 8601 timestamp the job was recorded. |
Envelope (excluded from the hash)
| Field | Type | Notes |
|---|---|---|
| receiptHash | string | SHA-256 over the canonical economic core. Unique; duplicates rejected. |
| receiptSignature | string | null | Optional signature over the receipt envelope. |
| status | ReceiptStatus | Lifecycle status (see below). Excluded from the hash. |
| settlementBatchId | string | null | Batch that settled the reward, once batched. Excluded from the hash. |
| settlementTxHash | string | null | Base tx hash, once settled. Excluded from the hash. |
Statuses
A receipt carries one of six statuses. Status lives in the envelope, so it can move through the lifecycle without changing the receipt hash.
receiptHash determinism
The receiptHash is the SHA-256 of the canonical JSON of the immutable economic core. Canonical JSON means recursively sorted keys and no incidental whitespace, so the same economic outcome always hashes to the same value and anyone can recompute it.
Sample receipt hash
The hash excludes the envelope — status, receiptSignature, and the settlement pointers — so it stays stable as the receipt moves from completed to settled. A duplicate jobId or receiptHash is rejected, so a job is never recorded or paid twice.
Looking up a receipt
Fetch a single receipt by its hash. The response includes the receipt and a verified flag — the server recomputes the hash and reports whether it matches.
curl -s https://basis.watch/api/inference/receipts/<receipt_hash>
# { "receipt": { ... }, "verified": true }List recent receipts:
curl -s https://basis.watch/api/inference/receipts