Reference
HTTP API
Every route, its parameters, response shape and errors, and the live updates.
The HTTP API serves what the laplace program holds as JSON: the network's totals, models, operators, offers, receipts and disputes, with token ids decoded to text. It also stores the model files, relays JSON-RPC to the cluster for browsers and streams every change as server-sent events. This page lists every route, every field it answers, every error and the typed client.
Conventions
Requests are written against $LAPLACE_API, the API address of the network. Addresses gives it per cluster.
curl "$LAPLACE_API/v1/network"Every route except the file download and the event stream answers JSON. Values are encoded the same way everywhere:
| Value | Encoding | Example |
|---|---|---|
| Amount | Unsigned integer base units as a decimal string, at most 18446744073709551615. Lamports for bonds, the mint's base units for fees. Parse with BigInt. | "2000000000" |
| Time | ISO-8601 in UTC | "2026-11-17T13:00:30.647Z" |
| Hash, root | 64 lowercase hex characters | "957dc373…d139727" |
| Key, address | base58 of 32 bytes, 32 to 44 characters | "8sizdpXJ…J7uKA" |
| Signature | base58 of 64 bytes, 64 to 88 characters | "3zrGo4rR…wH1Qt" |
| Token ids | Integers from 0 to 65535 | [101, 24636, 3123] |
| Count, seconds, slot, basis points | JSON integer | 1000 |
In a response shape, a field that has no value yet is null. It is never left out.
Every response carries these headers:
| Header | Value |
|---|---|
X-Request-Id | A UUID for this request. |
X-Contract-Version | The version of the shapes on this page, 0.1.0. The SDK exports the same string as CONTRACT_VERSION. |
Cache-Control | no-store, except a model file (public, max-age=31536000, immutable) and the event stream (no-cache). |
X-Content-Type-Options | nosniff |
Routes
| Method | Path | Answers |
|---|---|---|
| GET | /v1/network | Network |
| GET | /v1/models | { items: Model[] } |
| GET | /v1/models/:slug | ModelDetail |
| GET | /v1/models/:slug/files | ModelFiles |
| GET | /v1/files/:hash | The bytes of one model file |
| POST | /v1/files | { hash, bytes } |
| GET | /v1/operators | { items: Operator[] } |
| GET | /v1/operators/:key | OperatorDetail |
| GET | /v1/offers | { items: Offer[] } |
| GET | /v1/receipts | { items: Receipt[], nextCursor } |
| GET | /v1/receipts/:address | ReceiptDetail |
| GET | /v1/disputes | { items: Dispute[] } |
| GET | /v1/disputes/reference | DisputeDetail |
| GET | /v1/disputes/:address | DisputeDetail |
| GET | /v1/events | Server-sent events |
| POST | /v1/rpc | A JSON-RPC response from the cluster |
| GET | /health | { "status": "ready" } once the program and its Config account are on the cluster, { "status": "waiting" } before |
Any other path or method answers NOT_FOUND with the message This API route was not found.
Query parameters are checked strictly. A value outside its type or limits, or a parameter the route does not define, answers VALIDATION_ERROR with one message per field. The sample responses on this page are captured from the network; arrays are shortened where a comment says so.
Network totals
GET /v1/network takes no parameters and answers a Network: counts of receipts and disputes, the bonds, the fees, the protocol's share and the token. The live values of protocol_share_bps and slash_winner_bps are read here, as protocol.shareBps and protocol.slashWinnerBps.
curl "$LAPLACE_API/v1/network"{
"receipts": { "total": 20, "requested": 1, "answered": 9, "challenged": 0, "final": 9, "void": 1 },
"disputes": { "total": 5, "open": 0, "wonByDefender": 3, "wonByChallenger": 2, "byTimeout": 2 },
"bondsLockedLamports": "14000000000",
"bondsFreeLamports": "40000000123",
"operators": 4,
"models": 2,
"feesPaid": [
{
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"amount": "155000"
}
],
"protocol": {
"feeRecipient": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu",
"shareBps": 1000,
"slashWinnerBps": 5000,
"received": [
{
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"amount": "15500"
}
],
"receivedLamports": "4500000000"
},
"token": { "mint": null, "venue": null, "burned": null, "symbol": "LAPLACE", "supply": "1000000000" },
"asOf": "2026-11-18T08:19:58.623Z"
}Models
List
GET /v1/models takes no parameters and answers { items: Model[] }, every registered Model in the order it was registered.
curl "$LAPLACE_API/v1/models"{
"items": [
{
"slug": "judge",
"address": "3jjzvAw5pHJeCGb4PkycL6N5E5H1jjMXpM94BRGK6Tnh",
"name": "Judge",
"task": "judge",
"summary": "Reads a claim and a passage of evidence, answers yes, no or unclear.",
"weights": {
"source": "gokulsrinivasagan/bert_uncased_L-2_H-256_A-4_mnli",
"licence": "Apache-2.0",
"url": "https://huggingface.co/gokulsrinivasagan/bert_uncased_L-2_H-256_A-4_mnli"
},
"parameters": 9591811,
"sizeBytes": 10064724,
"stepCount": 134491,
"inputMax": 64,
"outputLength": 1,
"windowSeconds": 300,
"bondLamports": "2000000000",
"weightsRoot": "3a9f1e68fc8e71bb8d25447a6cc31a1fd3cf0a750313a86cca4b87b16db86f93",
"programRoot": "53d73dadd1a80e861f8b482afa0d7d8a1dfd8cb18be42c3459b313058fc8be59",
"initRoot": "86ecb892a9b5fcea30164a926fc0c857051c6f628cabff7289bff6eb4fbfce1d",
"publisher": "5wPWwsDwKZTAXAKraLoUKhemZE1b3fHfpxEzjK4G3ndc",
"operators": 3,
"receipts": 10,
"disputes": 4,
"labels": ["yes", "unclear", "no"],
"registeredAt": "2026-11-18T08:13:21.000Z"
},
{
"slug": "market",
"address": "JC6FksAd2dfTxN9Hbf9d6faTYCufLZTdL1swim25DW5d",
"name": "Market",
"task": "market",
"summary": "Reads a market headline or statement, answers positive, neutral or negative.",
"weights": {
"source": "9mark9/finbert-minilm-sentiment",
"licence": "MIT",
"url": "https://huggingface.co/9mark9/finbert-minilm-sentiment"
},
"parameters": 33361155,
"sizeBytes": 34903360,
"stepCount": 1318668,
"inputMax": 32,
"outputLength": 1,
"windowSeconds": 300,
"bondLamports": "1000000000",
"weightsRoot": "8e8edab1ad8cb4ed145d292b40f25d5b20757c6fe02cb1bfe51447c1217ff276",
"programRoot": "ca724dd25ca38a36a4384081330c85e89bc25458b9bd6ddbdccc955191270cd4",
"initRoot": "8f8dfa519306420d8a7875a10c084e91542451632bcca01a38073f056914aa3e",
"publisher": "5wPWwsDwKZTAXAKraLoUKhemZE1b3fHfpxEzjK4G3ndc",
"operators": 4,
"receipts": 10,
"disputes": 1,
"labels": ["negative", "neutral", "positive"],
"registeredAt": "2026-11-18T08:13:24.000Z"
}
]
}One model
GET /v1/models/:slug answers a ModelDetail: the model, its offers, its 10 newest receipts, its 10 newest disputes and its files. A model's window and bond are read here, as windowSeconds and bondLamports.
slugpath, stringrequired- The model's slug, as
register_modelset it:judgeormarketon the network.
Fails with NOT_FOUND and the message No model with this slug. when no model has the slug, and with NOT_FOUND and The files of this model are not in the store yet. when the model is registered and its manifest has not been uploaded.
curl "$LAPLACE_API/v1/models/market"{
"slug": "market",
"address": "JC6FksAd2dfTxN9Hbf9d6faTYCufLZTdL1swim25DW5d",
"name": "Market",
"task": "market",
"summary": "Reads a market headline or statement, answers positive, neutral or negative.",
"weights": {
"source": "9mark9/finbert-minilm-sentiment",
"licence": "MIT",
"url": "https://huggingface.co/9mark9/finbert-minilm-sentiment"
},
"parameters": 33361155,
"sizeBytes": 34903360,
"stepCount": 1318668,
"inputMax": 32,
"outputLength": 1,
"windowSeconds": 300,
"bondLamports": "1000000000",
"weightsRoot": "8e8edab1ad8cb4ed145d292b40f25d5b20757c6fe02cb1bfe51447c1217ff276",
"programRoot": "ca724dd25ca38a36a4384081330c85e89bc25458b9bd6ddbdccc955191270cd4",
"initRoot": "8f8dfa519306420d8a7875a10c084e91542451632bcca01a38073f056914aa3e",
"publisher": "5wPWwsDwKZTAXAKraLoUKhemZE1b3fHfpxEzjK4G3ndc",
"operators": 4,
"receipts": 10,
"disputes": 1,
"labels": ["negative", "neutral", "positive"],
"registeredAt": "2026-11-18T08:13:24.000Z",
"offers": [
{
"address": "Q5CQn3zM9eFMgW14GGovTUA7CY4K7JFBhMhhYW4zLx6",
"operator": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"model": "market",
"price": "10000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"active": true,
"live": true,
"lastAnswerAt": "2026-11-18T08:19:15.000Z",
"updatedAt": "2026-11-18T08:13:28.000Z"
},
{
"address": "9JYYmFGpudppxjLZAtrzcysGKZrsWGLN78Yb6gWKTS8p",
"operator": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"model": "market",
"price": "15000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"active": true,
"live": true,
"lastAnswerAt": "2026-11-18T08:16:24.000Z",
"updatedAt": "2026-11-18T08:13:29.000Z"
},
// … 2 more
],
"recentReceipts": [
{
"address": "2XW7VCZyNdvy2L1Nrkqr1jvLbmbc9wbhQPu88sw6jYVr",
"model": "market",
"operator": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"requester": "226HXVr51SFVUXEZobnCT7W8NA3mbz4my1iNU4Tz7iwd",
"seed": "33199150807634",
"input": {
"tokens": [101, 24636, 3123, 2324, 1003, 1999, /* 8 more */],
"text": "shipments rose 18 % in the third quarter , above guidance . [SEP]"
},
"inputHash": "71cf62ae68b477559d755d238b1f3c496ec45ee90d1335b4b95367dacba6fe5a",
"output": {
"tokens": [2],
"text": "positive",
"label": "positive"
},
"traceRoot": "957dc3739265d273cf888e350f93ded73f5b3ba53eb88ebbb82c99a34d139727",
"fee": {
"amount": "10000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 }
},
"answerer": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"answererRole": "operator",
"bondLamports": "1000000000",
"state": "answered",
"requestedAt": "2026-11-18T08:19:11.000Z",
"answerDeadline": "2026-11-18T08:20:41.000Z",
"answeredAt": "2026-11-18T08:19:15.000Z",
"windowEndsAt": "2026-11-18T08:24:15.000Z",
"windowRemainingSeconds": null,
"finalizedAt": null,
"dispute": null,
"disputes": 0
},
// … 9 more
],
"recentDisputes": [
{
"address": "5m6Vuchnvpb47iSNRXM13PWdFHANwQDLqnKTzrs7Jb35",
"receipt": "9B8hQnijTiS4vqJ3WT8Jr2kwdYrnm7US8LQk1C39BTbj",
"model": "market",
"index": 0,
"defender": {
"by": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"output": {
"tokens": [2],
"text": "positive",
"label": "positive"
},
"traceRoot": "27bf2295238e55dbd235f8998810d7c029c8c5b378babd3aa9b4c992ce3f0675"
},
"challenger": {
"by": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS",
"output": {
"tokens": [0],
"text": "negative",
"label": "negative"
},
"traceRoot": "456bb20582140173bfb756d8514fdbac1d9332af34fce952eae2b3fe58a42339"
},
"bondLamports": "1000000000",
"state": "resolved",
"interval": {
"lo": 1316037,
"hi": 1316038,
"loRoot": "1b5a046381916bfb0a6de284b1e09f8471d4461fd7a72d975f0ebdb707969eef",
"hiRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"hiOwner": "challenger"
},
"stepCount": 1318668,
"turn": "challenger",
"turnDeadline": "2026-11-18T08:17:35.000Z",
"points": [],
"turns": 8,
"openedAt": "2026-11-18T08:16:27.000Z",
"result": {
"winner": "challenger",
"by": "step",
"step": {
"index": 1316037,
"op": "residual",
"layer": null,
"reads": [
{ "leaf": 482, "name": "token 0 · sublayer out · 1" },
{ "leaf": 2, "name": "token 0 · hidden · 1" }
],
"computedRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"claimedRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"matched": true
},
"moves": [
{ "to": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS", "role": "winner", "lamports": "500000000" },
{ "to": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu", "role": "protocol", "lamports": "500000000" }
],
"signature": "3zrGo4rRNZ4WfW9obHjVK3szXEWrGsmqB5WVrN2oeTtBa5mJjDXeAdxpCSFwnXenBap9BHjNPzMWuyHKqrmwH1Qt",
"at": "2026-11-18T08:16:38.000Z"
}
}
],
"files": {
"slug": "market",
"manifest": {
"hash": "57f80b9a78e3a7958fda43d0e3269b18801119557b438aee0e42f59e7c13137a",
"bytes": 1220,
"url": "/v1/files/57f80b9a78e3a7958fda43d0e3269b18801119557b438aee0e42f59e7c13137a"
},
"weights": {
"hash": "4d181dbee63cc44efdcabf722207514399503189cefc2fa4671bfb5ced568e84",
"bytes": 34903360,
"url": "/v1/files/4d181dbee63cc44efdcabf722207514399503189cefc2fa4671bfb5ced568e84"
},
"program": {
"hash": "ecdbe7fc726d06564a54195dad1423218b28f54af5b1e9faf8045940aca4de3b",
"bytes": 42222837,
"url": "/v1/files/ecdbe7fc726d06564a54195dad1423218b28f54af5b1e9faf8045940aca4de3b"
},
"tokenizer": {
"hash": "07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3",
"bytes": 231508,
"url": "/v1/files/07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3"
}
}
}Model files
A model is four files, each stored and served by its SHA-256: the manifest (JSON that names the model, its roots and the hash and size of the other three), the weights, the program (the step list) and the tokenizer. The manifest's hash is the files_hash the model registered on chain, so every file is checked against the chain before it is used. The integer format describes what the files hold.
The files of a model
GET /v1/models/:slug/files answers a ModelFiles: the hash, size and path of each file. slug and the two NOT_FOUND cases are those of GET /v1/models/:slug.
curl "$LAPLACE_API/v1/models/judge/files"{
"slug": "judge",
"manifest": {
"hash": "88b9c7c1e9434c45c2db5cf08bd80d9cf625dc4c5e6ae0e97a56cd57d34e4e64",
"bytes": 1237,
"url": "/v1/files/88b9c7c1e9434c45c2db5cf08bd80d9cf625dc4c5e6ae0e97a56cd57d34e4e64"
},
"weights": {
"hash": "3a90fef90b6ef2f3f72f2c4cb9e783800cfdfa08be023023ab487469bdc1327d",
"bytes": 10064724,
"url": "/v1/files/3a90fef90b6ef2f3f72f2c4cb9e783800cfdfa08be023023ab487469bdc1327d"
},
"program": {
"hash": "7de6faf66193668004de746ee69a86f37157d69f6d413b7e852eb45bb4ff8b30",
"bytes": 4337750,
"url": "/v1/files/7de6faf66193668004de746ee69a86f37157d69f6d413b7e852eb45bb4ff8b30"
},
"tokenizer": {
"hash": "07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3",
"bytes": 231508,
"url": "/v1/files/07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3"
}
}Downloading a file
GET /v1/files/:hash answers the file's bytes with Content-Type: application/octet-stream, Cache-Control: public, max-age=31536000, immutable and Vary: Accept-Encoding. The bytes at a hash never change.
When the request's Accept-Encoding header names gzip, the body is the file compressed with gzip and the response carries Content-Encoding: gzip. The compressed copy is made on the first such request and kept beside the file. The hash is always that of the file itself, so a client checks it after decompressing. fetch in a browser and in Node sends Accept-Encoding: gzip and decompresses by itself; curl does both with --compressed. The market model's program file, 42,222,837 bytes, is the one this changes most: it travels as about 5.6 MB.
hashpath, 64 lowercase hexrequired- The file's SHA-256, from
ModelFilesor from the manifest.
Fails with NOT_FOUND and No file with this hash. when hash is not 64 lowercase hex characters or no file is stored under it.
curl --compressed -o market.program "$LAPLACE_API/v1/files/ecdbe7fc726d06564a54195dad1423218b28f54af5b1e9faf8045940aca4de3b"
sha256sum market.programUploading a model file
POST /v1/files stores one file of a model that is already registered on chain. The body is the file's raw bytes. laplace model publish sends these four requests after register_model; Publish a model covers the whole task.
X-Modelheader, stringrequired- The model's slug.
X-Fileheaderrequired- Which file the body is:
manifest,weights,programortokenizer. bodybytesrequired- The file, at most 64 MiB (67,108,864 bytes).
The manifest is uploaded first. The checks run in this order, and the first that fails answers:
| Check | Error | Message |
|---|---|---|
| The body is at most 64 MiB | PAYLOAD_TOO_LARGE | The request body is too large. or The file is too large. |
| The client has sent at most 30 uploads in the current minute | RATE_LIMITED | Too many requests. Try again in a minute. |
X-File is one of the four kinds | VALIDATION_ERROR | X-File must be manifest, weights, program or tokenizer. |
The Model account of X-Model exists on the cluster, read at confirmed | MODEL_NOT_REGISTERED | Register the model on chain before uploading its files. |
manifest: the body's SHA-256 equals the model's files_hash | ROOT_MISMATCH | This manifest does not hash to the files hash the model registered. |
manifest: its roots.program, roots.weights and roots.init equal the model's program_root, weights_root and init_root | ROOT_MISMATCH | The manifest names roots other than the ones the model registered. |
| Other kinds: the model's manifest is in the store | MODEL_NOT_REGISTERED | Upload the manifest first. |
| Other kinds: the body's SHA-256 equals the hash the manifest names for that kind | ROOT_MISMATCH | This weights file is not the one the manifest names. (with the kind sent) |
A file that passes is written once under its hash, and sending it again answers the same. The response is { hash, bytes }:
hashHex- The SHA-256 of the body, the hash it is served under.
bytesinteger- The size of the body.
curl -X POST "$LAPLACE_API/v1/files" \
-H "Content-Type: application/octet-stream" \
-H "X-Model: judge" \
-H "X-File: manifest" \
--data-binary @manifest.jsonOperators
List
GET /v1/operators takes no parameters and answers { items: Operator[] }, every registered Operator in the order it registered.
curl "$LAPLACE_API/v1/operators"{
"items": [
{
"key": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"address": "8eAynmjourMTaiAA1NifTM896ZtYGyHQquNw4QNFAPkK",
"bondFree": "20000000000",
"bondLocked": "10000000000",
"withdrawal": null,
"models": ["judge", "market"],
"receiptsAnswered": 13,
"disputesWon": 2,
"disputesLost": 0,
"lastAnswerAt": "2026-11-18T08:19:15.000Z",
"registeredAt": "2026-11-18T08:13:25.000Z"
},
{
"key": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"address": "3CSJjMwEMnX2TEuGfBGKKRW6KxXui8xAxfzNnM1FyHqB",
"bondFree": "17000000000",
"bondLocked": "0",
"withdrawal": null,
"models": ["judge", "market"],
"receiptsAnswered": 3,
"disputesWon": 0,
"disputesLost": 2,
"lastAnswerAt": "2026-11-18T08:16:24.000Z",
"registeredAt": "2026-11-18T08:13:28.000Z"
},
// … 2 more
]
}One operator
GET /v1/operators/:key answers an OperatorDetail: the operator, all its offers, the 50 newest receipts that name it or that it answered, and the 50 newest disputes it is a side of.
keypath, Keyrequired- The operator's authority key, not the address of its
Operatoraccount.
Fails with VALIDATION_ERROR when key is not a base58 key of 32 bytes, and with NOT_FOUND and No operator with this key. when no operator has it.
curl "$LAPLACE_API/v1/operators/8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA"{
"key": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"address": "8eAynmjourMTaiAA1NifTM896ZtYGyHQquNw4QNFAPkK",
"bondFree": "22000000000",
"bondLocked": "8000000000",
"withdrawal": null,
"models": ["judge", "market"],
"receiptsAnswered": 13,
"disputesWon": 2,
"disputesLost": 0,
"lastAnswerAt": "2026-11-18T08:19:15.000Z",
"registeredAt": "2026-11-18T08:13:25.000Z",
"offers": [
{
"address": "Q5CQn3zM9eFMgW14GGovTUA7CY4K7JFBhMhhYW4zLx6",
"operator": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"model": "market",
"price": "10000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"active": true,
"live": true,
"lastAnswerAt": "2026-11-18T08:19:15.000Z",
"updatedAt": "2026-11-18T08:13:28.000Z"
},
{
"address": "CndbfhbEzYikd4VLDgVybxEVeafEteGc9SmL7pAnRQmH",
"operator": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"model": "judge",
"price": "20000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"active": true,
"live": true,
"lastAnswerAt": "2026-11-18T08:19:15.000Z",
"updatedAt": "2026-11-18T08:13:28.000Z"
}
],
"receipts": [
{
"address": "2XW7VCZyNdvy2L1Nrkqr1jvLbmbc9wbhQPu88sw6jYVr",
"model": "market",
"operator": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"requester": "226HXVr51SFVUXEZobnCT7W8NA3mbz4my1iNU4Tz7iwd",
"seed": "33199150807634",
"input": {
"tokens": [101, 24636, 3123, 2324, 1003, 1999, /* 8 more */],
"text": "shipments rose 18 % in the third quarter , above guidance . [SEP]"
},
"inputHash": "71cf62ae68b477559d755d238b1f3c496ec45ee90d1335b4b95367dacba6fe5a",
"output": {
"tokens": [2],
"text": "positive",
"label": "positive"
},
"traceRoot": "957dc3739265d273cf888e350f93ded73f5b3ba53eb88ebbb82c99a34d139727",
"fee": {
"amount": "10000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 }
},
"answerer": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"answererRole": "operator",
"bondLamports": "1000000000",
"state": "answered",
"requestedAt": "2026-11-18T08:19:11.000Z",
"answerDeadline": "2026-11-18T08:20:41.000Z",
"answeredAt": "2026-11-18T08:19:15.000Z",
"windowEndsAt": "2026-11-18T08:24:15.000Z",
"windowRemainingSeconds": null,
"finalizedAt": null,
"dispute": null,
"disputes": 0
},
// … 12 more
],
"disputes": [
{
"address": "J9SYJPEx5vVvCdbyb5aR7V2oyWyNh9NRuKsrNeBdFGro",
"receipt": "72qZynXj1QXpJibcHTJS9tM2vqjrg368Eiw2FYYZgLwR",
"model": "judge",
"index": 0,
"defender": {
"by": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"output": {
"tokens": [2],
"text": "no",
"label": "no"
},
"traceRoot": "9e5289a5370dc4c43856062dc5bdc1e6c4d5bad099d973321c79772f3f858711"
},
"challenger": {
"by": "AvbNTjWSgQ1zLU64KaCjGwb8mQ3uVVKWcfCEFNVhKRHE",
"output": {
"tokens": [0],
"text": "yes",
"label": "yes"
},
"traceRoot": "6c41bbf2811c11b29a5bf4fee6986ecba0efc3bd1ed71c4359865422ee29fa0b"
},
"bondLamports": "2000000000",
"state": "resolved",
"interval": {
"lo": 117679,
"hi": 134491,
"loRoot": "92738fbba2570085e158bcc1e8292252a56cf3a000af7ab2aa4b8337f87cba24",
"hiRoot": "fa346dd1eea190a0a8efeb0e2e61adcf6e32ab38d2f7b9e68feb1c4754f192be",
"hiOwner": "challenger"
},
"stepCount": 134491,
"turn": "challenger",
"turnDeadline": "2026-11-18T08:19:42.000Z",
"points": [],
"turns": 2,
"openedAt": "2026-11-18T08:18:40.000Z",
"result": {
"winner": "defender",
"by": "timeout",
"step": null,
"moves": [
{ "to": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA", "role": "winner", "lamports": "1000000000" },
{ "to": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu", "role": "protocol", "lamports": "1000000000" }
],
"signature": "43LjohKpjrA2jgtHavSpr4FYgXk45zpKEE52uDWp26AQJLMfU4XvbacpseFHxdv7PjKTfJw33tFcHojKftHmFjwm",
"at": "2026-11-18T08:19:44.000Z"
}
},
// … 1 more
]
}Offers
GET /v1/offers answers { items: Offer[] }: every Offer, active or not, live ones first and then by price from the lowest. The first item with live: true is the cheapest live offer, the one laplace.ask takes when no offer is named.
modelquery, string- A model's slug, at most 24 characters. Keeps only that model's offers. A slug no model has answers an empty list.
curl "$LAPLACE_API/v1/offers?model=market"{
"items": [
{
"address": "Q5CQn3zM9eFMgW14GGovTUA7CY4K7JFBhMhhYW4zLx6",
"operator": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"model": "market",
"price": "10000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"active": true,
"live": true,
"lastAnswerAt": "2026-11-18T08:19:15.000Z",
"updatedAt": "2026-11-18T08:13:28.000Z"
},
{
"address": "9JYYmFGpudppxjLZAtrzcysGKZrsWGLN78Yb6gWKTS8p",
"operator": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"model": "market",
"price": "15000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 },
"active": true,
"live": true,
"lastAnswerAt": "2026-11-18T08:16:24.000Z",
"updatedAt": "2026-11-18T08:13:29.000Z"
},
// … 2 more
]
}Receipts
List
GET /v1/receipts answers one page of Receipt objects, newest request first, with the filters combined.
modelquery, string- A model's slug, at most 24 characters. A slug no model has answers an empty page.
operatorquery, Key- The operator the request named.
requesterquery, Key- The key that sent the request.
statequeryrequested,answered,challenged,finalorvoid.limitquery, integer- Items per page, from 1 to 100. Default 30.
cursorquery, string- Where the page starts: the
nextCursorof the page before. Digits only, at most 12. Left out, the page starts at the newest receipt.
The response is { items, nextCursor }:
itemsReceipt[]- At most
limitreceipts. nextCursorstring | null- The
cursorof the next page, ornullwhen this page is the last.
Pages
/v1/receipts is the one paged route. A cursor is a position in the filtered list, counted from the newest receipt: the first page's nextCursor is its limit as a string, and each page after adds its own limit. Send it back unchanged with the same filters until nextCursor is null. Because positions count from the newest, a receipt requested while a client is paging moves every later one down by one, and a receipt already read can appear again on the next page; match items by address.
curl "$LAPLACE_API/v1/receipts?limit=2"
curl "$LAPLACE_API/v1/receipts?limit=2&cursor=2"{
"items": [
{
"address": "2XW7VCZyNdvy2L1Nrkqr1jvLbmbc9wbhQPu88sw6jYVr",
"model": "market",
"operator": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"requester": "226HXVr51SFVUXEZobnCT7W8NA3mbz4my1iNU4Tz7iwd",
"seed": "33199150807634",
"input": {
"tokens": [101, 24636, 3123, 2324, 1003, 1999, /* 8 more */],
"text": "shipments rose 18 % in the third quarter , above guidance . [SEP]"
},
"inputHash": "71cf62ae68b477559d755d238b1f3c496ec45ee90d1335b4b95367dacba6fe5a",
"output": {
"tokens": [2],
"text": "positive",
"label": "positive"
},
"traceRoot": "957dc3739265d273cf888e350f93ded73f5b3ba53eb88ebbb82c99a34d139727",
"fee": {
"amount": "10000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 }
},
"answerer": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"answererRole": "operator",
"bondLamports": "1000000000",
"state": "answered",
"requestedAt": "2026-11-18T08:19:11.000Z",
"answerDeadline": "2026-11-18T08:20:41.000Z",
"answeredAt": "2026-11-18T08:19:15.000Z",
"windowEndsAt": "2026-11-18T08:24:15.000Z",
"windowRemainingSeconds": null,
"finalizedAt": null,
"dispute": null,
"disputes": 0
},
{
"address": "2JfFcQV7GY5bBzr7Mjo6MAxyajwvNxkhBR6hgyarKjD7",
"model": "market",
"operator": "FxR8UBm37Bj7LHPKCmx7NfxpvyVMhHdmSPn8RY9BygPi",
"requester": "226HXVr51SFVUXEZobnCT7W8NA3mbz4my1iNU4Tz7iwd",
"seed": "7",
"input": {
"tokens": [101, 3514, 7597, 6706, 3805, 1997, /* 5 more */],
"text": "oil prices steady ahead of the opec meeting [SEP]"
},
"inputHash": "a12dd1726b7d4eabcba2619d5b74b2875dced1e2a54d7ac96d3f741071b73299",
"output": {
"tokens": [2],
"text": "positive",
"label": "positive"
},
"traceRoot": "a00058b090c673bf4c0d5ff84cfe3210da9b50b79b49b6d8d39b51a850d2853e",
"fee": {
"amount": "20000",
"mint": { "address": "3NSxxuxpM8QqGemeBdzoXCM1f7jErQPJaikUWVDHXYXi", "symbol": "3NSx…", "decimals": 6 }
},
"answerer": "FxR8UBm37Bj7LHPKCmx7NfxpvyVMhHdmSPn8RY9BygPi",
"answererRole": "operator",
"bondLamports": "1000000000",
"state": "answered",
"requestedAt": "2026-11-18T08:18:17.000Z",
"answerDeadline": "2026-11-18T08:19:47.000Z",
"answeredAt": "2026-11-18T08:18:17.000Z",
"windowEndsAt": "2026-11-18T08:23:17.000Z",
"windowRemainingSeconds": null,
"finalizedAt": null,
"dispute": null,
"disputes": 0
}
],
"nextCursor": "2"
}One receipt
GET /v1/receipts/:address answers a ReceiptDetail: the receipt, every transaction that touched it and every dispute it has seen.
addresspath, Keyrequired- The address of the receipt account.
Fails with VALIDATION_ERROR when address is not a base58 key of 32 bytes, and with NOT_FOUND and No receipt at this address. when the API holds no receipt there.
curl "$LAPLACE_API/v1/receipts/9B8hQnijTiS4vqJ3WT8Jr2kwdYrnm7US8LQk1C39BTbj"{
"address": "9B8hQnijTiS4vqJ3WT8Jr2kwdYrnm7US8LQk1C39BTbj",
"model": "market",
"operator": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"requester": "AvbNTjWSgQ1zLU64KaCjGwb8mQ3uVVKWcfCEFNVhKRHE",
"seed": "79766469206685",
"input": {
"tokens": [101, 4082, 5618, 3062, 2000, 7327, /* 16 more */],
"text": "operating profit fell to eur 3 . 1 mn from eur 8 . 7 mn a year earlier [SEP]"
},
"inputHash": "a9c2f7a544f0096bf71c8a2fe70dc7f47f0e94c326eec64d32ec0af53ef6c8f7",
"output": {
"tokens": [0],
"text": "negative",
"label": "negative"
},
"traceRoot": "456bb20582140173bfb756d8514fdbac1d9332af34fce952eae2b3fe58a42339",
"fee": {
"amount": "15000",
"mint": { "address": "Dox8XhkKsEWYQwVEdGvdKofSVcQa6Tmmf7rkK7dprBX5", "symbol": "USDC", "decimals": 6 }
},
"answerer": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS",
"answererRole": "challenger",
"bondLamports": "1000000000",
"state": "answered",
"requestedAt": "2026-11-18T08:16:04.000Z",
"answerDeadline": "2026-11-18T08:17:34.000Z",
"answeredAt": "2026-11-18T08:16:38.000Z",
"windowEndsAt": "2026-11-18T08:21:38.000Z",
"windowRemainingSeconds": null,
"finalizedAt": null,
"dispute": null,
"disputes": 1,
"transactions": [
{
"signature": "vh8p9QSuhg7hQb6TpreEimcg6ga9CL1v3Q2wBWRse7Ja38m62LZiy18EH2HPL4fnPLGyC4rPVHgicAugMQeXr6g",
"kind": "request",
"by": "AvbNTjWSgQ1zLU64KaCjGwb8mQ3uVVKWcfCEFNVhKRHE",
"at": "2026-11-18T08:16:04.000Z",
"slot": 414
},
{
"signature": "5zRkXSDPz5D5hysnEexmhjtg42qGyTnz3mWTRwJfzK9Ch5aJH26xBBWuaCGXQhMFDZcye4kxaScBdgkdZ3CLmurg",
"kind": "answer",
"by": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"at": "2026-11-18T08:16:24.000Z",
"slot": 455
},
// … 9 more
],
"history": [
{
"address": "5m6Vuchnvpb47iSNRXM13PWdFHANwQDLqnKTzrs7Jb35",
"receipt": "9B8hQnijTiS4vqJ3WT8Jr2kwdYrnm7US8LQk1C39BTbj",
"model": "market",
"index": 0,
"defender": {
"by": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"output": {
"tokens": [2],
"text": "positive",
"label": "positive"
},
"traceRoot": "27bf2295238e55dbd235f8998810d7c029c8c5b378babd3aa9b4c992ce3f0675"
},
"challenger": {
"by": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS",
"output": {
"tokens": [0],
"text": "negative",
"label": "negative"
},
"traceRoot": "456bb20582140173bfb756d8514fdbac1d9332af34fce952eae2b3fe58a42339"
},
"bondLamports": "1000000000",
"state": "resolved",
"interval": {
"lo": 1316037,
"hi": 1316038,
"loRoot": "1b5a046381916bfb0a6de284b1e09f8471d4461fd7a72d975f0ebdb707969eef",
"hiRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"hiOwner": "challenger"
},
"stepCount": 1318668,
"turn": "challenger",
"turnDeadline": "2026-11-18T08:17:35.000Z",
"points": [],
"turns": 8,
"openedAt": "2026-11-18T08:16:27.000Z",
"result": {
"winner": "challenger",
"by": "step",
"step": {
"index": 1316037,
"op": "residual",
"layer": null,
"reads": [
{ "leaf": 482, "name": "token 0 · sublayer out · 1" },
{ "leaf": 2, "name": "token 0 · hidden · 1" }
],
"computedRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"claimedRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"matched": true
},
"moves": [
{ "to": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS", "role": "winner", "lamports": "500000000" },
{ "to": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu", "role": "protocol", "lamports": "500000000" }
],
"signature": "3zrGo4rRNZ4WfW9obHjVK3szXEWrGsmqB5WVrN2oeTtBa5mJjDXeAdxpCSFwnXenBap9BHjNPzMWuyHKqrmwH1Qt",
"at": "2026-11-18T08:16:38.000Z"
}
}
]
}Disputes
List
GET /v1/disputes answers { items: Dispute[] }: the 100 newest Dispute objects that pass the filters, newest first.
receiptquery, Key- The receipt the disputes are about.
operatorquery, Key- A key that is the defender or the challenger.
statequeryopen,provingorresolved.
curl "$LAPLACE_API/v1/disputes?state=resolved"{
"items": [
{
"address": "J9SYJPEx5vVvCdbyb5aR7V2oyWyNh9NRuKsrNeBdFGro",
"receipt": "72qZynXj1QXpJibcHTJS9tM2vqjrg368Eiw2FYYZgLwR",
"model": "judge",
"index": 0,
"defender": {
"by": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA",
"output": {
"tokens": [2],
"text": "no",
"label": "no"
},
"traceRoot": "9e5289a5370dc4c43856062dc5bdc1e6c4d5bad099d973321c79772f3f858711"
},
"challenger": {
"by": "AvbNTjWSgQ1zLU64KaCjGwb8mQ3uVVKWcfCEFNVhKRHE",
"output": {
"tokens": [0],
"text": "yes",
"label": "yes"
},
"traceRoot": "6c41bbf2811c11b29a5bf4fee6986ecba0efc3bd1ed71c4359865422ee29fa0b"
},
"bondLamports": "2000000000",
"state": "resolved",
"interval": {
"lo": 117679,
"hi": 134491,
"loRoot": "92738fbba2570085e158bcc1e8292252a56cf3a000af7ab2aa4b8337f87cba24",
"hiRoot": "fa346dd1eea190a0a8efeb0e2e61adcf6e32ab38d2f7b9e68feb1c4754f192be",
"hiOwner": "challenger"
},
"stepCount": 134491,
"turn": "challenger",
"turnDeadline": "2026-11-18T08:19:42.000Z",
"points": [],
"turns": 2,
"openedAt": "2026-11-18T08:18:40.000Z",
"result": {
"winner": "defender",
"by": "timeout",
"step": null,
"moves": [
{ "to": "8sizdpXJVwKTSdEKdbPa5xXobaJoD9gN1mqEnEUJ7uKA", "role": "winner", "lamports": "1000000000" },
{ "to": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu", "role": "protocol", "lamports": "1000000000" }
],
"signature": "43LjohKpjrA2jgtHavSpr4FYgXk45zpKEE52uDWp26AQJLMfU4XvbacpseFHxdv7PjKTfJw33tFcHojKftHmFjwm",
"at": "2026-11-18T08:19:44.000Z"
}
},
{
"address": "4WjVgwpPXwD3DhBrfm8qGySbWkzDiT9Envh4NgYrZDDW",
"receipt": "CXCjo4accbFoBQ1eQ56WL8Lqm2LFbmrg9Z4DhDwyAJ46",
"model": "judge",
"index": 0,
"defender": {
"by": "FxR8UBm37Bj7LHPKCmx7NfxpvyVMhHdmSPn8RY9BygPi",
"output": {
"tokens": [2],
"text": "no",
"label": "no"
},
"traceRoot": "9e5289a5370dc4c43856062dc5bdc1e6c4d5bad099d973321c79772f3f858711"
},
"challenger": {
"by": "AvbNTjWSgQ1zLU64KaCjGwb8mQ3uVVKWcfCEFNVhKRHE",
"output": {
"tokens": [0],
"text": "yes",
"label": "yes"
},
"traceRoot": "1b084773b5432c3db5c2e654395777ebfe66846605f38d9e79a79d8eef9a4e92"
},
"bondLamports": "2000000000",
"state": "resolved",
"interval": {
"lo": 134488,
"hi": 134489,
"loRoot": "e9c033d85a786cc36ad7482c1cb4f71a0c48a6375297972f3f1f85f2fb9f00c1",
"hiRoot": "d47e254cb7210a779695255bf8c9b0c1ca88f07bd4c51611fe81954f7a87c1ca",
"hiOwner": "defender"
},
"stepCount": 134491,
"turn": "defender",
"turnDeadline": "2026-11-18T08:19:17.000Z",
"points": [],
"turns": 7,
"openedAt": "2026-11-18T08:18:15.000Z",
"result": {
"winner": "defender",
"by": "step",
"step": {
"index": 134488,
"op": "matvec",
"layer": null,
"reads": [
{ "leaf": 1411, "name": "pooled · 1" },
{ "leaf": 1412, "name": "logits" }
],
"computedRoot": "d47e254cb7210a779695255bf8c9b0c1ca88f07bd4c51611fe81954f7a87c1ca",
"claimedRoot": "d47e254cb7210a779695255bf8c9b0c1ca88f07bd4c51611fe81954f7a87c1ca",
"matched": true
},
"moves": [
{ "to": "FxR8UBm37Bj7LHPKCmx7NfxpvyVMhHdmSPn8RY9BygPi", "role": "winner", "lamports": "1000000000" },
{ "to": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu", "role": "protocol", "lamports": "1000000000" }
],
"signature": "2dy5cEb6PvV5ZnrzuYCJ9PmP68U5PDXX1NU7NfuJ1FgezsJRC567T1B9bF7nTPJpsSnPhbHaEpWbxQA3CftGmzZJ",
"at": "2026-11-18T08:18:18.000Z"
}
},
// … 3 more
]
}One dispute
GET /v1/disputes/:address answers a DisputeDetail: the dispute, every turn played and its transactions.
addresspath, Keyrequired- The address of the dispute account.
Fails with VALIDATION_ERROR when address is not a base58 key of 32 bytes, and with NOT_FOUND and No dispute at this address. when the API holds no dispute there.
curl "$LAPLACE_API/v1/disputes/5m6Vuchnvpb47iSNRXM13PWdFHANwQDLqnKTzrs7Jb35"{
"address": "5m6Vuchnvpb47iSNRXM13PWdFHANwQDLqnKTzrs7Jb35",
"receipt": "9B8hQnijTiS4vqJ3WT8Jr2kwdYrnm7US8LQk1C39BTbj",
"model": "market",
"index": 0,
"defender": {
"by": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"output": {
"tokens": [2],
"text": "positive",
"label": "positive"
},
"traceRoot": "27bf2295238e55dbd235f8998810d7c029c8c5b378babd3aa9b4c992ce3f0675"
},
"challenger": {
"by": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS",
"output": {
"tokens": [0],
"text": "negative",
"label": "negative"
},
"traceRoot": "456bb20582140173bfb756d8514fdbac1d9332af34fce952eae2b3fe58a42339"
},
"bondLamports": "1000000000",
"state": "resolved",
"interval": {
"lo": 1316037,
"hi": 1316038,
"loRoot": "1b5a046381916bfb0a6de284b1e09f8471d4461fd7a72d975f0ebdb707969eef",
"hiRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"hiOwner": "challenger"
},
"stepCount": 1318668,
"turn": "challenger",
"turnDeadline": "2026-11-18T08:17:35.000Z",
"points": [],
"turns": 8,
"openedAt": "2026-11-18T08:16:27.000Z",
"result": {
"winner": "challenger",
"by": "step",
"step": {
"index": 1316037,
"op": "residual",
"layer": null,
"reads": [
{ "leaf": 482, "name": "token 0 · sublayer out · 1" },
{ "leaf": 2, "name": "token 0 · hidden · 1" }
],
"computedRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"claimedRoot": "a383f8903450b242749534f139f222ae3b653e0294216886afaa7789e3c587e1",
"matched": true
},
"moves": [
{ "to": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS", "role": "winner", "lamports": "500000000" },
{ "to": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu", "role": "protocol", "lamports": "500000000" }
],
"signature": "3zrGo4rRNZ4WfW9obHjVK3szXEWrGsmqB5WVrN2oeTtBa5mJjDXeAdxpCSFwnXenBap9BHjNPzMWuyHKqrmwH1Qt",
"at": "2026-11-18T08:16:38.000Z"
},
"history": [
{
"n": 0,
"by": "challenger",
"selected": null,
"points": [
{ "step": 164833, "root": "e85ef47d0882f81f858dbc74535706582e4a43fda1305870f1721ae5d8debf55" },
{ "step": 329667, "root": "6372da1803c2f0e6c2c55d052814b8132109bc5d48cea159496e79e71ed0c3a8" },
// … 5 more
],
"signature": "5GqAUkBqKD86TndU9pA6o42aE98nj4P6hzFwHS934ipiAvgJSnXauWjC8H6ABRW5LfFSAMt799mPvu1AR8TaYRfa",
"at": "2026-11-18T08:16:27.000Z"
},
{
"n": 1,
"by": "defender",
"selected": { "lo": 1153834, "hi": 1318668 },
"points": [
{ "step": 1174438, "root": "fee30baa723d35707808c19b332bf48dd05757f530adb99ade7f8807c15ebabb" },
{ "step": 1195042, "root": "d468ff95b4503b3b0cb68a504a2f76a74b0fe55ea6de4a55c4cd305531782e35" },
// … 5 more
],
"signature": "3A6DB6fYTdQkNp2yXML9s9prVjzSTUx6rEQex87xYFtGM9mkgRbsdsUSoi4zLuGKWfCPZN7VRpK6jK94Hqx5tjM1",
"at": "2026-11-18T08:16:28.000Z"
},
// … 6 more
],
"transactions": [
{
"signature": "5GqAUkBqKD86TndU9pA6o42aE98nj4P6hzFwHS934ipiAvgJSnXauWjC8H6ABRW5LfFSAMt799mPvu1AR8TaYRfa",
"kind": "challenge",
"by": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS",
"at": "2026-11-18T08:16:27.000Z",
"slot": 463
},
{
"signature": "3A6DB6fYTdQkNp2yXML9s9prVjzSTUx6rEQex87xYFtGM9mkgRbsdsUSoi4zLuGKWfCPZN7VRpK6jK94Hqx5tjM1",
"kind": "bisect",
"by": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"at": "2026-11-18T08:16:28.000Z",
"slot": 466
},
// … 7 more
]
}The reference dispute
GET /v1/disputes/reference takes no parameters and answers the DisputeDetail of the first dispute on the network that was resolved by a proven step. It is the dispute The challenge game walks turn by turn. Fails with NOT_FOUND and No dispute has been proven on a step yet. until one exists.
curl "$LAPLACE_API/v1/disputes/reference"{
"address": "EduB96cgp5hpg5hRbyUBK9wACsKYwxz4KnLQZ3mDjzCP",
"receipt": "BWJZvBcBSgz8jg2MPS8B9kKqN2Paeb9QQpQzjSTRBoMQ",
"model": "judge",
"index": 0,
"defender": {
"by": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"output": {
"tokens": [0],
"text": "yes",
"label": "yes"
},
"traceRoot": "6eefea8a3eaaad98c69ed1d067816b03e29dfbc2da9e84dc7a0ca3eb56c4c402"
},
"challenger": {
"by": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS",
"output": {
"tokens": [1],
"text": "unclear",
"label": "unclear"
},
"traceRoot": "73a3e98b0893757d9c5f5c289bd3a3b8e9de604798dc8f98272851778cae5b62"
},
"bondLamports": "2000000000",
"state": "resolved",
"interval": {
"lo": 133316,
"hi": 133317,
"loRoot": "30fa485377e9a9723b21cad9c7976d7cdeb2de5b2b4a4620a88068d10035b94f",
"hiRoot": "c16c5e5c19549160c4db45f8d2736f620a32cc7725ff1b7408a25778686fb84b",
"hiOwner": "defender"
},
"stepCount": 134491,
"turn": "defender",
"turnDeadline": "2026-11-18T08:15:20.000Z",
"points": [],
"turns": 7,
"openedAt": "2026-11-18T08:13:48.000Z",
"result": {
"winner": "challenger",
"by": "step",
"step": {
"index": 133316,
"op": "residual",
"layer": null,
"reads": [
{ "leaf": 642, "name": "token 0 · sublayer out · 1" },
{ "leaf": 2, "name": "token 0 · hidden · 1" }
],
"computedRoot": "a48bbe127583aa4637a7e74330ef705891b4b813fdbb8a217b3b5aeda39b47b0",
"claimedRoot": "c16c5e5c19549160c4db45f8d2736f620a32cc7725ff1b7408a25778686fb84b",
"matched": false
},
"moves": [
{ "to": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS", "role": "winner", "lamports": "1000000000" },
{ "to": "J9UnZNvFQ24npBmehLdweJ8Z33vyWtGqSCvYN32uZLwu", "role": "protocol", "lamports": "1000000000" }
],
"signature": "5iKcL8gtMDQJomviBUSUtQAHQDufHi3AuuyU4sxhpDEpbRGS2Xn57M35ANW8TA31qfBUzqqnwtDmgMtH7RALs7ok",
"at": "2026-11-18T08:14:22.000Z"
},
"history": [
{
"n": 0,
"by": "challenger",
"selected": null,
"points": [
{ "step": 16811, "root": "3904c0c32d65656a772066d218933374067c69a1487e34ae77cbd8a9a000e06a" },
{ "step": 33622, "root": "0e015f360ac7d05c4c04c46d21e8af9d028375c8df329fbf7139dbb4109d3ee6" },
// … 5 more
],
"signature": "27uv3jMP97Go5rJFwxFcZGYUjnWyQy7pgw3nZSzuuDC1wwckpQCDj2PeaV8PY2q7P439edkQHnUbnM4FB3gQGxHA",
"at": "2026-11-18T08:13:48.000Z"
},
{
"n": 1,
"by": "defender",
"selected": { "lo": 117679, "hi": 134491 },
"points": [
{ "step": 119780, "root": "91a738fdea9df02082b538d6cbdc6c195629a0aba833d093ef15291c513fd971" },
{ "step": 121882, "root": "c80127be95fdd00ba187e3eaf6e749a97aea7ebf5158130f47fc37f50ce01dbf" },
// … 5 more
],
"signature": "2CG6YUF8qjv2fNeK3S2ht2yQetnMQck4yChMgcYtTCiAWJWMzKa7M6CLMg1RhiJg1RsgaNCAzYHLkWgEcjpziD5P",
"at": "2026-11-18T08:14:13.000Z"
},
// … 5 more
],
"transactions": [
{
"signature": "27uv3jMP97Go5rJFwxFcZGYUjnWyQy7pgw3nZSzuuDC1wwckpQCDj2PeaV8PY2q7P439edkQHnUbnM4FB3gQGxHA",
"kind": "challenge",
"by": "27wTG6u7ZTc3bSyn2wfzQQ2CXzhAXWYsoPyYoGkP6dXS",
"at": "2026-11-18T08:13:48.000Z",
"slot": 113
},
{
"signature": "2CG6YUF8qjv2fNeK3S2ht2yQetnMQck4yChMgcYtTCiAWJWMzKa7M6CLMg1RhiJg1RsgaNCAzYHLkWgEcjpziD5P",
"kind": "bisect",
"by": "6nUQzUVo4F9oanqhVAgikDhiASnzCFbmhYQLuisAuJHk",
"at": "2026-11-18T08:14:13.000Z",
"slot": 168
},
// … 6 more
]
}Shapes
Each shape is defined once here. The zod schema and the TypeScript type of each are exported under the same name from @laplace/sdk/api. Key, Hex, Amount and Time are the encodings under Conventions. Every object is strict: it holds exactly the fields listed.
Mint
| Field | Type | Meaning |
|---|---|---|
address | Key | The SPL mint. |
symbol | string | The mint's display symbol. |
decimals | integer, 0 to 18 | Decimal places of the mint's base unit. |
Tokens
Token ids with their decoded text. An input is always a Tokens.
| Field | Type | Meaning |
|---|---|---|
tokens | integer[] | The token ids, as the account holds them. |
text | string | The ids decoded with the model's tokenizer. The ids joined by spaces when the tokenizer is not in the store. |
Output
| Field | Type | Meaning |
|---|---|---|
tokens | integer[] | The output token ids. |
text | string | The decoded output: the label, for a model whose manifest names labels. |
label | string | null | The label the first token names, from the model's labels. null for a model without labels. |
Model
| Field | Type | Meaning |
|---|---|---|
slug | string | The model's slug: judge or market on the network. |
address | Key | The Model account. |
name | string | The model's name, from its manifest: Judge or Market. |
task | 'judge' | 'market' | What kind of answer the model gives. |
summary | string | One line saying what it answers. |
weights | { source, licence, url } | Three strings: where the open weights come from, their licence and a link to them. |
parameters | integer | The parameter count. |
sizeBytes | integer | The size of the weights file. |
stepCount | integer | Steps in one run. |
inputMax | integer | The longest input, in tokens. |
outputLength | integer | The length of every output, in tokens. |
windowSeconds | integer | The model's window. |
bondLamports | Amount | The model's bond, in lamports. |
weightsRoot, programRoot, initRoot | Hex | The three roots the model registered. |
publisher | Key | The key that registered the model. |
operators | integer | Active offers for the model. |
receipts | integer | Receipts that name the model. |
disputes | integer | Disputes on those receipts. |
labels | string[] | null | The label of each output token, by index, from the manifest: ["yes", "unclear", "no"] for judge, ["negative", "neutral", "positive"] for market. null for a model whose manifest names none. |
registeredAt | Time | When the model was registered. |
ModelDetail
Every field of Model, and:
| Field | Type | Meaning |
|---|---|---|
offers | Offer[] | The model's offers, live first, then by price. |
recentReceipts | Receipt[] | Its 10 newest receipts. |
recentDisputes | Dispute[] | Its 10 newest disputes. |
files | ModelFiles | Its files. |
ModelFiles
| Field | Type | Meaning |
|---|---|---|
slug | string | The model's slug. |
manifest, weights, program, tokenizer | { hash, bytes, url } | One entry per file: hash (Hex) is its SHA-256, bytes (integer) its size, url (string) its path on this API, /v1/files/ followed by the hash. |
Offer
| Field | Type | Meaning |
|---|---|---|
address | Key | The Offer account. |
operator | Key | The operator's authority key. |
model | string | The model's slug. |
price | Amount | The fee per request, in the mint's base units. |
mint | Mint | The mint the price is charged in. |
active | boolean | Whether the operator has the offer switched on. |
live | boolean | true when the offer is active, the operator's free bond covers the model's bond, and no request to this operator for this model made since its last answer is still requested past its answer deadline. |
lastAnswerAt | Time | null | When the operator last answered any request. |
updatedAt | Time | When the offer was last set. |
Operator
| Field | Type | Meaning |
|---|---|---|
key | Key | The operator's authority key. |
address | Key | The Operator account. |
bondFree | Amount | Lamports of bond not behind any answer. |
bondLocked | Amount | Lamports locked behind answers in their window. |
withdrawal | { amount, availableAt } | null | The withdrawal requested: amount (Amount) in lamports and availableAt (Time), when the cooldown ends. null when none is requested. |
models | string[] | Slugs of the models it has an active offer for. |
receiptsAnswered | integer | Answers it has posted. |
disputesWon, disputesLost | integer | Disputes it won and lost. |
lastAnswerAt | Time | null | When it last answered. |
registeredAt | Time | When it registered. |
OperatorDetail
Every field of Operator, and:
| Field | Type | Meaning |
|---|---|---|
offers | Offer[] | All its offers, live first, then by price. |
receipts | Receipt[] | The 50 newest receipts that name it or that it answered. |
disputes | Dispute[] | The 50 newest disputes it defends or challenges in. |
Receipt
The receipt account, as Receipts describes it, with text decoded and times as strings.
| Field | Type | Meaning |
|---|---|---|
address | Key | The receipt account. |
model | string | The model's slug. |
operator | Key | The operator the request named. |
requester | Key | The key that sent the request. |
seed | Amount | The seed, a u64 as a decimal string. |
input | Tokens | The input. |
inputHash | Hex | SHA-256 of the input tokens, each as a u16 in little-endian bytes. |
output | Output | null | The answer that stands. null before an answer. |
traceRoot | Hex | null | The trace root of that answer. |
fee | { amount, mint } | amount (Amount) in the base units of mint (a Mint). |
answerer | Key | null | The key whose bond stands behind the answer. |
answererRole | 'operator' | 'challenger' | null | operator while the named operator's answer stands, challenger once a challenger's answer has replaced it. |
bondLamports | Amount | Lamports locked behind the answer while the state is answered or challenged. "0" in every other state. |
state | 'requested' | 'answered' | 'challenged' | 'final' | 'void' | The receipt's state. |
requestedAt | Time | When the request landed. |
answerDeadline | Time | The last moment the operator can answer. |
answeredAt | Time | null | When the standing answer was posted. |
windowEndsAt | Time | null | When the window closes. null before an answer and while challenged. |
windowRemainingSeconds | integer | null | Set while challenged: the seconds of window that resume if the challenger loses. |
finalizedAt | Time | null | When the receipt became final. null in every other state. |
dispute | Key | null | The open dispute. |
disputes | integer | Challenges this receipt has seen. |
ReceiptDetail
Every field of Receipt, and:
| Field | Type | Meaning |
|---|---|---|
transactions | Transaction[] | The receipt's own transactions (request, answer, challenge, finalize, cancel_request) in chain order, then those of each dispute. |
history | Dispute[] | Every dispute of the receipt, in the order they opened. |
Transaction
| Field | Type | Meaning |
|---|---|---|
signature | Signature | The transaction's signature. |
kind | string | The instruction: request, answer, challenge, bisect, prove_step, claim_timeout, finalize or cancel_request. |
by | Key | The key that signed it. |
at | Time | The block time. |
slot | integer | The slot it landed in. |
Dispute
One challenge and the state of its game. The challenge game explains the interval and the turns.
| Field | Type | Meaning |
|---|---|---|
address | Key | The Dispute account. |
receipt | Key | The receipt it is about. |
model | string | The model's slug. |
index | integer | Which challenge of the receipt this is, from 0. |
defender | Claim | The answer that stood when the challenge opened. |
challenger | Claim | The rival answer. |
bondLamports | Amount | Each side's bond, in lamports. |
state | 'open' | 'proving' | 'resolved' | open while the sides narrow the interval, proving once one step is left, resolved when the game is over. |
interval | object | The steps still in dispute: lo and hi (integers), loRoot (Hex, the state root both sides hold at lo), hiRoot (Hex, the claimed state root at hi) and hiOwner ('defender' or 'challenger', the side whose claim hiRoot is). |
stepCount | integer | The model's step count, the whole run the interval is part of. |
turn | 'defender' | 'challenger' | The side that moves next. |
turnDeadline | Time | When that side's turn ends. |
points | Point[] | While open: the points the last turn committed, which the side on turn picks from. Empty in the other states. |
turns | integer | Turns played so far. |
openedAt | Time | When the challenge landed. |
result | DisputeResult | null | How it ended. null until resolved. |
Claim
| Field | Type | Meaning |
|---|---|---|
by | Key | The side's key. |
output | Output | The output it claims. |
traceRoot | Hex | The trace root it claims. |
Point
| Field | Type | Meaning |
|---|---|---|
step | integer | A step index inside the interval. |
root | Hex | The state root the side commits to after that step. |
Turn
| Field | Type | Meaning |
|---|---|---|
n | integer | The turn's number. Turn 0 is the challenge itself. |
by | 'defender' | 'challenger' | The side that played it. |
selected | { lo, hi } | null | The part of the other side's points this turn chose to dispute, as two step indexes. null for turn 0. |
points | Point[] | The points this turn committed inside that part. Empty when one step is left. |
signature | Signature | The turn's transaction. |
at | Time | When it landed. |
DisputeResult
| Field | Type | Meaning |
|---|---|---|
winner | 'defender' | 'challenger' | The side that won. |
by | 'step' | 'timeout' | step when the program executed the step, timeout when the side on turn missed its deadline. |
step | object | null | Set when by is step: index (integer, the step executed), op (string, the operation's name, such as matvec, residual or softmax), layer (integer or null), reads (an array of { leaf, name }, the state pages the step reads by index and name), computedRoot (Hex, the root the program computed), claimedRoot (Hex, the interval's hiRoot) and matched (boolean, whether the two are equal). |
moves | array | Where the loser's bond went, one { to, role, lamports } each: to (Key), role ('winner', 'protocol' or 'bond-returned') and lamports (Amount). The winner's part and the protocol's part are listed. |
signature | Signature | The prove_step or claim_timeout transaction. |
at | Time | When it landed. |
DisputeDetail
Every field of Dispute, and:
| Field | Type | Meaning |
|---|---|---|
history | Turn[] | Every turn, from turn 0. |
transactions | Transaction[] | The dispute's transactions in chain order: challenge, each bisect, then prove_step or claim_timeout. |
Network
| Field | Type | Meaning |
|---|---|---|
receipts | object | Integers: total, and the count in each state, requested, answered, challenged, final, void. |
disputes | object | Integers: total, open (not yet resolved), wonByDefender, wonByChallenger and byTimeout. |
bondsLockedLamports | Amount | The locked bond of every operator, summed. |
bondsFreeLamports | Amount | The free bond of every operator, summed. |
operators | integer | Registered operators. |
models | integer | Registered models. |
feesPaid | array | The fees of final receipts, one { mint, amount } per mint: a Mint and an Amount in its base units. |
protocol.feeRecipient | Key | fee_recipient of the Config account. |
protocol.shareBps | integer | protocol_share_bps of Config: basis points of each finalized fee. |
protocol.slashWinnerBps | integer | slash_winner_bps of Config: basis points of a lost bond paid to the winner. |
protocol.received | array | The protocol's share of the fees in feesPaid, one { mint, amount } per mint: each total times shareBps, divided by 10,000 and rounded down. |
protocol.receivedLamports | Amount | The protocol's part of every lost bond, summed. |
token.mint | Key | null | The token's mint. |
token.venue | string | null | A link to where the token trades. |
token.burned | Amount | null | Token base units burned to date. null while mint is null. |
token.symbol | 'LAPLACE' | The token's symbol. |
token.supply | '1000000000' | The token's fixed supply, in whole tokens. |
asOf | Time | When the totals were read. |
Errors
Every failed request to a route above, except /v1/rpc, answers one envelope with the HTTP status of its code:
{
"error": {
"code": "NOT_FOUND",
"message": "No receipt at this address.",
"retryable": false,
"stage": "read"
}
}codestring- The error, from the tables below. Branch on this.
messagestring- One sentence fit to show.
retryableboolean- Whether the same request can succeed later.
stagestring- The part of the flow that failed:
validation,auth,read,upload,build,wallet,co_sign,simulation,sendorconfirmation. fieldErrorsobject- On
VALIDATION_ERRORfrom a query or path parameter: an array of messages per parameter name. Messages about a path parameter, and about a parameter the route does not define, are under the keyform. programErrorobject- On
CHAIN_REFUSED:{ programId, name, number }, the program that refused a transaction, the name of its error and its code. retryAfterSecondsinteger- On
RATE_LIMITED: seconds until the limit resets. The same number is sent as theRetry-Afterheader. requestIdstring- On
INTERNAL_ERROR: the request's id, equal to theX-Request-Idheader.
A request with three bad parameters:
curl "$LAPLACE_API/v1/receipts?foo=1&limit=500&cursor=abc"{
"error": {
"code": "VALIDATION_ERROR",
"message": "Check the highlighted fields.",
"retryable": false,
"stage": "validation",
"fieldErrors": {
"cursor": ["Invalid string: must match pattern /^[0-9]+$/"],
"limit": ["Too big: expected number to be <=100"],
"form": ["Unrecognized key: \"foo\""]
}
}
}The codes the routes answer:
| Code | Status | Retryable | Stage | Raised when |
|---|---|---|---|---|
VALIDATION_ERROR | 400 | no | validation | A query or path parameter fails its type or limits, or the query holds a parameter the route does not define. On POST /v1/files, with stage upload, the X-File header is not one of the four kinds. |
ORIGIN_NOT_ALLOWED | 403 | no | validation | The request carries an Origin header that is not on the API's list. See CORS. |
NOT_FOUND | 404 | no | read | No route at this path and method, or no model, file, operator, receipt or dispute at the slug, hash, key or address given, or a model whose manifest is not in the store, or no dispute proven on a step yet. |
MODEL_NOT_REGISTERED | 409 | no | upload | An upload for a slug with no Model account, or a file sent before the model's manifest. |
PAYLOAD_TOO_LARGE | 413 | no | validation or upload | A request body over 64 MiB. |
ROOT_MISMATCH | 422 | no | upload | An uploaded manifest that does not hash to the model's files_hash or names other roots, or a file that does not hash to what the manifest names. |
RATE_LIMITED | 429 | yes | validation | More than 30 uploads from one client in one minute. Carries retryAfterSeconds. |
INTERNAL_ERROR | 500 | yes | read | The request could not be completed. Carries requestId. |
The ErrorCode enum of @laplace/sdk/api holds ten more codes, each with a fixed status, so one switch covers every Laplace service. No route on this page answers them:
| Code | Status |
|---|---|
UNAUTHORIZED | 401 |
RPC_METHOD_NOT_ALLOWED | 403 |
PROGRAM_UNAVAILABLE | 409 |
CONFIGURATION_REQUIRED | 409 |
IDEMPOTENCY_CONFLICT | 409 |
TRANSACTION_EXPIRED | 409 |
UNSUPPORTED_MEDIA_TYPE | 415 |
SIMULATION_FAILED | 422 |
CHAIN_REFUSED | 422 |
UPSTREAM_UNAVAILABLE | 502 |
The typed client raises two of them itself when a response is not the envelope, as The typed client describes. A program's own refusal of a transaction reaches the caller of the SDK as a LaplaceError; the codes are on Program errors.
Rate limits
Limits are counted per client address in fixed windows of one minute, starting at the client's first counted request.
| Requests | Limit per minute | Over the limit |
|---|---|---|
Every GET route | none | |
POST /v1/files | 30 | RATE_LIMITED, HTTP 429, with retryAfterSeconds and Retry-After |
POST /v1/rpc, every method but sendTransaction | 600 | JSON-RPC error -32005, HTTP 429, with Retry-After |
POST /v1/rpc, sendTransaction | 30 | JSON-RPC error -32005, HTTP 429, with Retry-After |
The three limits are counted apart from each other.
CORS
Browser calls are allowed from the origins the network lists, matched exactly by scheme, host and port. A request whose Origin header is not on the list is refused with ORIGIN_NOT_ALLOWED whatever its method, before any route runs, /v1/rpc included. A request with no Origin header, as a server, a script or curl sends it, is not checked. A page on another origin calls the API from its own server.
| Allowed methods | GET, POST, PUT, PATCH, DELETE, OPTIONS |
| Allowed request headers | Content-Type, Last-Event-ID, X-Model, X-File, solana-client |
| Headers a page can read | X-Request-Id, Retry-After, X-Contract-Version |
| Credentials | Not allowed. The API keeps no cookie and no session. |
| Preflight cache | 600 seconds |
RPC relay
POST /v1/rpc forwards one JSON-RPC request to the cluster, so a browser reads accounts and sends transactions through the API. A web3.js Connection takes the route's address as its endpoint, and createLaplace takes it as rpcUrl.
The body is one JSON-RPC 2.0 request of at most 64 KiB: jsonrpc is "2.0", id is a string or an integer, method is a string and params, when present, is an array. Batches are not relayed. These 19 methods are relayed, and no others:
| Counted as | Methods |
|---|---|
| Read | getAccountInfo, getMultipleAccounts, getBalance, getTokenAccountBalance, getSlot, getBlockHeight, getBlockTime, getLatestBlockhash, isBlockhashValid, getFeeForMessage, getRecentPrioritizationFees, getMinimumBalanceForRentExemption, getSignatureStatuses, getTransaction, getSignaturesForAddress, getGenesisHash, getVersion, simulateTransaction |
| Write | sendTransaction |
getRecentPrioritizationFees is what the SDK's 'auto' compute-unit price reads, so a page priced through the relay pays what the cluster is paying (Priority fees).
A relayed request answers HTTP 200 with the cluster's response, byte for byte, including the cluster's own JSON-RPC errors. A request the relay refuses answers a JSON-RPC error object, not the envelope above:
| HTTP | error.code | error.message | When |
|---|---|---|---|
| 400 | -32700 | Invalid JSON. | The body is not JSON. |
| 400 | -32600 | Send one request; batches are not relayed. | The body is an array or not an object. |
| 400 | -32600 | Expected jsonrpc 2.0 with an id, a method and array params. | A field is missing or has the wrong type. |
| 400 | -32601 | getProgramAccounts is not relayed. (with the method sent) | The method is not one of the 19. |
| 413 | -32600 | The request is too large. | The body is over 64 KiB. |
| 200 | -32004 | The program is not deployed yet. | The program is not on this cluster yet. Nothing is forwarded. |
| 429 | -32005 | Too many requests. Try again shortly. | The client is over its limit. Retry-After holds the seconds to wait. |
| 429 | -32005 | The service is at its RPC budget. Try again shortly. | The relay's own budget of cluster calls, kept apart from the indexer's and the workers' reads, would hold the request for more than one second. Retry-After is 1. |
| 502 | -32603 | The cluster RPC is unavailable. | The cluster did not answer, or answered a failed HTTP status. |
curl -X POST "$LAPLACE_API/v1/rpc" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getProgramAccounts","params":[]}'{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"getProgramAccounts is not relayed."}}Events
GET /v1/events is a server-sent event stream (text/event-stream) of every change the API sees. A screen reads its snapshot from the routes above once, then applies events.
receiptquery, Key- Keeps the
receiptevents of this receipt and thedisputeevents of its disputes.networkevents are not sent. disputequery, Key- Keeps the
disputeevents of this dispute and nothing else. Ignored whenreceiptis also given.
With no parameter the stream carries every event. A bad parameter answers VALIDATION_ERROR as JSON, before the stream opens.
Each event has three lines. event: is the type, id: is the event's id, and data: is one JSON object with the same four fields for every type:
typestringready,receipt,dispute,networkorresync. The same as theevent:line.idstring- The event's id. The same as the
id:line. timestampTime- When the API sent it.
dataobject- The payload, by type, below.
| Type | data | Sent when |
|---|---|---|
ready | { status: "ready" } | Once, when the connection opens. |
receipt | A Receipt | A receipt is created or changes: a request, an answer, a challenge, the end of a dispute, a finalize, a cancel. |
dispute | A Dispute | A dispute opens or changes: a challenge, each turn, a proven step, a claimed timeout. |
network | A Network | Something on the network changed. At most once a second. |
resync | { reason }, a string | The stream has a gap. reason is reconnected when the request carried a Last-Event-ID header, sent before ready, and behind when more than 500 events were waiting for this client and were dropped. |
Events carry the whole object, never a difference, so applying one is replacing what the screen holds for that address. A receipt event is a Receipt, without the transactions and history of ReceiptDetail; a dispute event is a Dispute, without the history and transactions of DisputeDetail.
The API replays nothing. After resync, fetch the snapshots again. A browser's EventSource reconnects by itself and sends the last id: it saw as Last-Event-ID, so every reconnection begins with resync. While nothing happens the stream sends the comment line : keepalive every 15 seconds, which EventSource ignores.
The first events of a connection that sent Last-Event-ID:
event: resync
data: {"type":"resync","id":"1794925238321-65","timestamp":"2026-11-17T14:20:38.321Z","data":{"reason":"reconnected"}}
id: 1794925238321-65
event: ready
data: {"type":"ready","id":"1794925238321-66","timestamp":"2026-11-17T14:20:38.321Z","data":{"status":"ready"}}
id: 1794925238321-66In a browser
LaplaceEvent is the union of the five events, so the handler of each type receives its own data. apiUrl, address and render are the page's own.
import { createApiClient, type LaplaceEvent } from '@laplace/sdk/api'
const api = createApiClient(apiUrl)
let receipt = await api.receipt(address)
render(receipt)
const source = new EventSource(api.eventsUrl({ receipt: address }))
function on<T extends LaplaceEvent['type']>(type: T, handle: (event: Extract<LaplaceEvent, { type: T }>) => void) {
source.addEventListener(type, (message: MessageEvent<string>) => handle(JSON.parse(message.data)))
}
on('receipt', (event) => {
receipt = { ...receipt, ...event.data }
render(receipt)
})
on('dispute', (event) => console.log('turn', event.data.turns, 'on', event.data.turn, 'until', event.data.turnDeadline))
on('resync', async () => {
receipt = await api.receipt(address)
render(receipt)
})In Node
Where there is no EventSource, the stream is read with fetch. This reader reconnects after one second and sends Last-Event-ID itself.
import { createApiClient, type LaplaceEvent } from '@laplace/sdk/api'
const api = createApiClient(process.env.LAPLACE_API!)
async function* events(url: string, signal?: AbortSignal): AsyncGenerator<LaplaceEvent> {
let lastId: string | undefined
while (!signal?.aborted) {
try {
const headers: Record<string, string> = { Accept: 'text/event-stream' }
if (lastId) headers['Last-Event-ID'] = lastId
const response = await fetch(url, { headers, signal })
if (!response.ok || !response.body) throw new Error(`HTTP ${response.status}`)
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader()
let buffer = ''
for (;;) {
const { value, done } = await reader.read()
if (done) break
buffer += value
let end: number
while ((end = buffer.indexOf('\n\n')) >= 0) {
const block = buffer.slice(0, end)
buffer = buffer.slice(end + 2)
const data = block.split('\n').find((line) => line.startsWith('data: '))
if (!data) continue // the keep-alive comment
const event = JSON.parse(data.slice(6)) as LaplaceEvent
lastId = event.id
yield event
}
}
} catch {
if (signal?.aborted) return
}
await new Promise((resolve) => setTimeout(resolve, 1000))
}
}
for await (const event of events(api.eventsUrl())) {
if (event.type === 'receipt') console.log(event.data.address, event.data.state)
if (event.type === 'dispute') console.log(event.data.address, event.data.state, event.data.interval.lo, event.data.interval.hi)
if (event.type === 'network') console.log(event.data.receipts.total, 'receipts')
if (event.type === 'resync') console.log('refetch snapshots:', event.data.reason)
}The typed client
createApiClient from @laplace/sdk/api is one method per route. Each parses the response with the zod schema of its shape, so the value it resolves is typed and checked. It uses the global fetch and runs in a browser, in a server component and in Node. createLaplace builds on it; TypeScript SDK covers the calls that send transactions.
createApiClient(baseUrl: string, options?: { fetch?, credentials?, headers? })baseUrlstringrequired- The API address. Trailing slashes are dropped.
options.fetchtypeof fetch- A
fetchto use in place of the global one. options.headersRecord<string, string>- Headers added to every request.
options.credentialsRequestCredentials- Passed to
fetch.
| Method | Route | Resolves |
|---|---|---|
health() | GET /health | { status } |
network() | GET /v1/network | Network |
models() | GET /v1/models | { items: Model[] } |
model(slug) | GET /v1/models/:slug | ModelDetail |
modelFiles(slug) | GET /v1/models/:slug/files | ModelFiles |
fileUrl(hash) | The address of GET /v1/files/:hash, as a string. No request is made. | |
operators() | GET /v1/operators | { items: Operator[] } |
operator(key) | GET /v1/operators/:key | OperatorDetail |
offers(model?) | GET /v1/offers | { items: Offer[] } |
receipts(query?) | GET /v1/receipts | { items: Receipt[], nextCursor }. query holds model, operator, requester, state, cursor, limit. |
receipt(address) | GET /v1/receipts/:address | ReceiptDetail |
disputes(query?) | GET /v1/disputes | { items: Dispute[] }. query holds receipt, operator, state. |
dispute(address) | GET /v1/disputes/:address | DisputeDetail |
referenceDispute() | GET /v1/disputes/reference | DisputeDetail |
upload(slug, kind, bytes) | POST /v1/files | { hash, bytes }. kind is 'manifest', 'weights', 'program' or 'tokenizer', bytes a Uint8Array. |
eventsUrl(filter?) | The address of GET /v1/events for an EventSource, as a string. filter holds receipt or dispute. | |
http | The get, post, request, url and streamUrl functions the methods are built on. |
import { ApiClientError, createApiClient, type Receipt } from '@laplace/sdk/api'
const api = createApiClient(process.env.LAPLACE_API!)
// one object per route, parsed with the schema the server answered with
const network = await api.network()
console.log(network.receipts.final, 'final receipts,', network.protocol.shareBps, 'bps to the protocol')
// the cheapest live offer for a model: the list is sorted live first, then by price
const offer = (await api.offers('judge')).items.find((o) => o.live)
if (offer) console.log(offer.operator, BigInt(offer.price), offer.mint.symbol)
// every final receipt of one requester, page by page
async function finalReceipts(requester: string) {
const all: Receipt[] = []
let cursor: string | undefined
do {
const page = await api.receipts({ requester, state: 'final', limit: 100, cursor })
all.push(...page.items)
cursor = page.nextCursor ?? undefined
} while (cursor)
return all
}
// a failed call throws ApiClientError carrying the envelope
async function receiptOrNull(address: string) {
try {
return await api.receipt(address)
} catch (error) {
if (error instanceof ApiClientError && error.code === 'NOT_FOUND') return null
if (error instanceof ApiClientError && error.body.error.retryable) console.warn('retry later:', error.status, error.message)
throw error
}
}A failed call rejects with ApiClientError:
statusnumber- The HTTP status.
bodyobject- The whole envelope,
{ error }. codestringbody.error.code.messagestringbody.error.message.
When a response is not JSON or is a failed status with no envelope in it, the client builds the envelope itself: code UPSTREAM_UNAVAILABLE with retryable: true for a status of 500 or above, code INTERNAL_ERROR with retryable: false below it, stage read and the message The API answered HTTP 502. with the status received. A response that does not match its schema rejects with a ZodError. upload is the one method that rejects with a plain Error, whose message is the code, a colon and the envelope's message.
The same entry point exports each shape as a zod schema and a type (Receipt, ReceiptDetail, Dispute, DisputeDetail, Model, ModelDetail, ModelFiles, Offer, Operator, OperatorDetail, Network, Mint, Turn, Transaction, Point, DisputeResult), the query schemas (ReceiptQuery, DisputeQuery, OfferQuery, EventQuery), the event union LaplaceEvent, the error table errors (errors.status maps each code to its HTTP status, errors.ErrorCode and errors.ApiError are zod schemas), the primitives Address, Signature, Timestamp, U64, Hex and Amount, and CONTRACT_VERSION.