BASIS
Documentation

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.

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)

FieldTypeNotes
receiptVersionnumberSchema version of the receipt.
jobIdstringUnique business key for the job. Duplicates are rejected.
userIdstring | nullIdentifier for the caller, if known.
userWalletstring | nullCaller's wallet, if supplied.
workerIdstringThe worker that served the job.
workerWalletstringWorker's EVM reward address (empty for gateway-served jobs).
modelIdstringModel served, e.g. basis-default.
promptTokensnumberPrompt tokens billed.
outputTokensnumberOutput tokens billed.
latencyMsnumberObserved latency in milliseconds.
qualityBpsnumberQuality factor in bps.
uptimeBpsnumberWorker uptime factor in bps.
latencyBpsnumberLatency factor in bps.
modelMultiplierBpsnumberPricing multiplier in bps (10000 = 1x).
totalChargedRawstringTotal charged, in $BASIS base units.
workerRewardRawstringWorker reward, in $BASIS base units.
protocolFeeRawstringProtocol fee, in $BASIS base units.
tokenSymbolstringBASIS.
tokenAddressstringEmpty while the token is pending deployment.
chainIdnumberBase chain id (8453).
createdAtstringISO 8601 timestamp the job was recorded.

Envelope (excluded from the hash)

FieldTypeNotes
receiptHashstringSHA-256 over the canonical economic core. Unique; duplicates rejected.
receiptSignaturestring | nullOptional signature over the receipt envelope.
statusReceiptStatusLifecycle status (see below). Excluded from the hash.
settlementBatchIdstring | nullBatch that settled the reward, once batched. Excluded from the hash.
settlementTxHashstring | nullBase 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.

completedThe job finished and produced output. The economic core is final and the reward (if any) is accrued.
failedThe job did not complete. The reward is zero and the user is not overcharged.
rejected_qualityOutput was rejected on quality grounds. The reward is zero.
rejected_workerThe job was rejected at the worker level. The reward is zero.
pending_settlementA completed job whose accrued reward is queued to be settled on Base.
settledThe reward has been settled on Base. settlementBatchId and settlementTxHash point at the on-chain record.

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

receiptHash0x9f2c4d7a1b8e…0e7b4c1f

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.

bash
curl -s https://basis.watch/api/inference/receipts/<receipt_hash>

# { "receipt": { ... }, "verified": true }

List recent receipts:

bash
curl -s https://basis.watch/api/inference/receipts