Skip to content

Verifying Plexus Receipts

Every reply your organization’s endpoint serves through Plexus gets a receipt signed by Katara’s gateway. It records what the gateway sent your endpoint and what came back, and the price of the reply at the Connect rate. It does not say which weights ran: that is yours, and your endpoint’s own logs are the record of it.

You can check a receipt with no access to Katara: the receipt, the list of signing addresses and the verifier in either SDK are enough.

A receipt is an EIP-712 InferenceReceipt on the domain KataraInference, version 1, with the chain id and settlement contract of the network the environment serves (Networks). It travels as JSON with the plain values its hashed fields commit to:

FieldWhat it is
request_idThe request’s id, the same as the x-katara-request-id header and the X-Katara-Request-Id your endpoint received
org_model, endpoint_id, served_idYour model name, the endpoint’s id and the model id the endpoint served it under
ticket_hashKeccak-256 of katara.plexus.request.v1: followed by request_id
bundle_idKeccak-256 of katara.plexus.model.v1: followed by org_model
profile_idKeccak-256 of katara.plexus.endpoint.v1:, endpoint_id, / and served_id
job_idDerived from the request id
input_commitmentKeccak-256 of the request body exactly as sent to your endpoint
output_commitmentThe commitment to the reply as received
input_tokens, output_tokensThe counts your endpoint reported
started_at, first_token_at, completed_atMilliseconds since the epoch, in that order
actual_price, statusThe reply’s price at the Connect rate, in US dollars with nine decimal places as a whole number ("150000000" is $0.15), and 0 for complete. Receipts signed before the rate was in force say "0"
providerThe address that signed it
domain, hash, signatureThe domain, the EIP-712 digest and the 65-byte signature over it

A whole reply carries the receipt’s hash as receipt_hash in its katara object, and so does a stream. The signature can follow a few seconds after the reply. A self-served row does not reach your record until its receipt is signed, so a delay on Katara’s side holds the row back and never drops it.

Katara signs with a key per deployment and publishes every address that has signed receipts, with the dates it was in use:

Terminal window
curl -s https://api.katara.com/v1/plexus/receipt-signers
{
"object": "list",
"data": [
{ "address": "0x…", "from": "2026-11-13T00:00:00Z", "until": null }
]
}

The route needs no key. Test environments use https://api.katara.com/test/v1/plexus/receipt-signers. until is null for the address in use now. A receipt is valid only if its signer was in use when the reply completed, so when Katara replaces a key the old address stays on the list with an end date and old receipts keep verifying. Keep a copy of the list with the records you archive.

Each self-served row in the usage source of the audit record has billing self_served, the receipt_hash, the whole receipt, its receipt_signature and its receipt_signer. Read the rows directly or start an export; in CSV, the row carries receipt_signer and receipt_signature, and JSON lines carry the whole receipt.

Each check runs locally and makes no request.

import { verifyAuditExport, verifyPlexusReceipt } from '@katara/platform';
const signers = (await (await fetch('https://api.katara.com/v1/plexus/receipt-signers')).json()).data;
const lines = text.split('\n').filter(Boolean).map(line => JSON.parse(line));
const card = { tokens_per_million_usd: '0.15', floor_per_request_usd: '0.0001' };
const checked = verifyAuditExport(lines, signers, card); // throws on the first bad row
console.log(`${checked} receipts verified`);
verifyPlexusReceipt(row.receipt, signers, card); // one receipt
import json
from katara_platform import verify_audit_export, verify_plexus_receipt
with open('signers.json') as f:
signers = json.load(f)['data']
with open('usage.ndjson') as f:
records = [json.loads(line) for line in f if line.strip()]
card = {'tokens_per_million_usd': '0.15', 'floor_per_request_usd': '0.0001'}
print(verify_audit_export(records, signers, card), 'receipts verified')
verify_plexus_receipt(row['receipt'], signers, card) # one receipt

verifyAuditExport / verify_audit_export checks every self-served row: a row that names a receipt hash must carry the receipt, the receipt’s hash and signature must match the row, and the row’s receipt_signer must be the address that signed the receipt. Rows of other kinds are skipped. It returns how many receipts it checked.

For each receipt, the verifier checks that:

  1. It is signed, complete, and priced exactly as the rate you pass prices its token counts. Pass no rate for a receipt signed before the rate was in force: it must then say "0".
  2. ticket_hash, bundle_id and profile_id are the hashes of its request id, model name and endpoint.
  3. started_at ≤ first_token_at ≤ completed_at.
  4. hash is the EIP-712 digest of the receipt on its domain.
  5. The signature recovers to provider.
  6. provider is on the signer list, in use at completed_at.

It throws, or raises ValueError in Python, naming the first check that failed. Also confirm that the receipt’s domain names the chain id and settlement contract for its network listed on Networks: the verifier trusts the domain the receipt carries.

Replies your endpoint serves are metered per token at the Connect rate: $0.15 per million tokens, input and output together, and at least $0.0001 per request. The receipt’s actual_price is that figure for its own counts, so connectPrice(card, input_tokens + output_tokens) in TypeScript, or connect_price in Python, gives the same number. Your plan includes one billion tokens a month, which do not carry over; past them the price is drawn from your organization’s account or added to your monthly invoice, as your billing terms say. The connect object on each self-served row of the audit record shows how the reply was met: allowance, prepaid, post_paid or blend, with the amounts charged, accrued and outstanding.

A prepaid organization never runs up a bill. The hold placed before a reply is an estimate; when a reply costs more than the hold and the account could not cover the rest, the difference is recorded as an outstanding balance, shown on the billing page. Every Connect request is refused with insufficient_quota until the next top-up, which settles the balance before anything else.

The receipt’s input_commitment is the Keccak-256 of the exact bytes your endpoint received. If your gateway logs request bodies, hash the body logged under the same X-Katara-Request-Id and compare. Token counts and times can be compared the same way. Katara sends your endpoint no member identity; the audit record’s row names the member.