Skip to main content
POST
Preview a source
Fetches and evaluates a source the way a node would, without signing anything, and returns each input’s response, the decoded fields and the 32 bytes nodes would sign. Use it to check a source before you pay for a round. It is served when GET /v1/info reports preview: true, and it backs the Playground in the web app. Send {"source": {...}}, the same document as the source of an execute request.
  • Two runs. The source runs twice, one second apart. stable is false when the second run gave a different value or failed, and second says what it gave. A value that moves between fetches can keep nodes from agreeing in exact mode.
  • Failures are answers. A failure at a stage (fetch, decode, transform, assertion, encoding, policy) is a 200 with error (stage, input, message), and the response it failed on is still in inputs.
  • Policies. For a source with a policy, policy shows each candidate, whether it qualified, the combined value and the outcome of the first run.
  • Chain sources. A source whose inputs are all chain reads (evm, starknet, svm) runs on a node as a dry-run instead: each input reports the block or slot it read and its decoded fields, with no body. Only the chains in previewChains are run.
Refused with 422: a chain the gateway does not serve, a source that mixes http and chain inputs, a private source ({{secret.NAME}}), and a provider host paid per fetch (x402). The fetcher refuses loopback, private and other non-public addresses. Requests are limited per client address (429 with Retry-After); at capacity, or when no node can run a chain source, the answer is 503 with Retry-After. A body over 64 KiB is 413. Nothing is signed, charged or recorded, and a preview never pays a source.

Body

application/json

Source to preview

source
object

Source is a source document, as the source of an execute request.

Response

OK

data
object
status
string
Example:

"ok"