Accounts and stats
Three routes read summaries: everything one wallet has on the protocol, the protocol's counts, and the first model with a piece of its ciphertext. The errors every route shares are in Overview.
GET /v1/accounts/{wallet}#
Reads one wallet's side of the protocol in its three roles: the models it owns, the enclaves it operates and the calls it made. {wallet} is the wallet's address.
walletaddressrequiredThe wallet asked for.
modelsarray of ModelrequiredThe Model objects this wallet owns.
ownerEarningsarray of MoneyrequiredWhat the wallet was paid as an owner by settled calls, one Money per mint.
enclavesarray of EnclaverequiredThe Enclave objects this wallet operates, in the order of GET /v1/enclaves.
operatorEarningsarray of MoneyrequiredWhat the wallet was paid as an operator by settled calls, across every enclave it operates, one Money per mint.
callsarray of CallrequiredThe Call objects this wallet opened, latest opened first.
Every list is whole, without pages. A wallet with nothing on the protocol returns empty arrays.
| Code | When |
|---|---|
VALIDATION_ERROR | {wallet} is not an address. |
Next: a call whose status is refundable is refunded with POST /v1/calls/{id}/refund/build. An owned model is changed with the builds on Models. How earnings come about is in Fees and the token.
GET /v1/stats#
Reads the protocol's counts.
modelsintegerrequiredModels, in every status.
enclavesintegerrequiredEnclaves whose attestation record is unexpired at the current slot.
receiptsdecimal stringrequiredReceipts written.
callsSettleddecimal stringrequiredCalls settled. Each settled call has one receipt, so it equals receipts.
operatorEarningsarray of MoneyrequiredWhat all operators were paid by settled calls, one Money per mint.
currentSlotslotrequiredThe latest slot the API has read. Statuses that depend on a slot (live and expired enclaves and grants, refundable calls) are computed against it.
asOftimestamprequiredWhen the API assembled the response.
Next: the models behind the counts are at GET /v1/models and the enclaves at GET /v1/enclaves.
GET /v1/home#
Reads the summary a first screen shows: the counts, the model named sketch-32, the first bytes of its ciphertext and its latest receipts.
statsobjectrequiredThe response of GET /v1/stats.
modelModel or nullrequiredThe Model named sketch-32. null when it is not among the 100 models with the most settled calls.
ciphertextobject or nullrequiredThe first 256 bytes of the model's ciphertext, in the shape GET /v1/models/{id}/weights returns. null when model is null.
recentReceiptsarray of ReceiptrequiredThe model's 8 latest Receipt objects, latest settling slot first. Empty when model is null.
| Code | When |
|---|---|
UPSTREAM_UNAVAILABLE | The model's Weights account could not be read from the cluster. Retryable. |
Next: call the model as in Call a model in five minutes.