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 — whether it came from the signed-in web console or the programmatic API. 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. Worker rewards settle on Base only once the $BASIS token and the reward distributor contract are live — until then accrual is honest but unsettled.

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.

A receipt records the model, token counts, worker, pricing snapshot, and settlement accounting. It never contains your prompt or the model's output text — only the deterministic economic facts of the job are hashed and stored.

Every completed or failed job records a receipt. A gateway-served (proxied) job has no contributor worker wallet, so it is metered, not paid: workerWallet is empty and workerRewardRaw is "0". Only an orchestrator-routed job served by a contributor GPU with a valid EVM reward address can earn $BASIS.

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. INVARIANT: equals pricing.basisRequiredRaw.
workerRewardRawstringWorker reward, in $BASIS base units. "0" for any non-completed status and for gateway-served jobs.
protocolFeeRawstringProtocol fee (per-job burn share), in $BASIS base units.
pricingPricingSnapshotThe locked pricing snapshot: pricingEpochId, pricingSnapshotHash, usageCreditsRaw, basisPerCreditRaw, basisRequiredRaw, priceSource, and the utilization/supply/demand/provider-floor multipliers. Hashed — the receipt commits to the exact price the job was reserved at.
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.
quoteIdstring | nullPricing-quote linkage. Excluded from the hash.
paymentQuoteIdstring | nullPayment-quote linkage. Excluded from the hash.
paymentPaymentSnapshot | nullPayment-route pointers (provider, swap/deposit tx hashes, status), if any. 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