selo preflight asks Selo whether your endpoint is eligible for a release test and shows what the test will cost. It is free and needs no wallet. Selo reads your endpoint’s 402 with one unpaid request, checks it against your authorization and its own limits, and returns either an eligible preflight or the reason it is not eligible.
Flags
Body file rules
- The file must hold valid JSON other than
null, and be at most 64 KiB. Otherwise the CLI exits3before any request, for examplethe request body file order.json must hold a JSON value other than null. - Selo accepts a body only with
POST, and only up to 16 KiB once serialized. Otherwise Selo answers400 VALIDATION_FAILEDand the CLI exits3. - A relative path resolves against the directory you ran the command in.
What Selo checks
The CLI sendsPOST /v1/preflight with authorizationId, targetUrl, method and, when you pass --body, requestBody. Selo then:
- checks that the target is an
httpsURL on a public hostname on the default port; - checks that a verified, unexpired authorization covers the target’s origin, route and method;
- sends one unpaid request to your endpoint and reads its x402 challenge;
- checks that the challenge offers an
exactpayment in USDC on the Algorand network Selo pays on; - checks that your price fits the per-job limit on what Selo may spend on the target (0.50 USDC on the public API);
- when the target is eligible, looks it up in the Bazaar catalog for the later discovery check.
Output
Eligible
The CLI prints five lines on stdout and exits0:
Terminal
selo preflight does not print Selo’s payee. The payee appears in the 402 that Selo returns for POST /v1/release-test, and selo test prints it before signing. See Finding the payTo address.Not eligible
Selo answers with a reason code and a message. The CLI prints them on stderr and exits3:
Terminal
See Errors and reason codes for the full API error catalogue.
Refused or unavailable
Exit codes
Using the preflight id
selo test runs its own fresh preflight on every run, so you never pass a preflight id to it. Use selo preflight to check terms and eligibility before you pay, for example in a free CI job on every build.
The preflight id matters when you pay Selo with another x402 client: POST /v1/release-test takes it as preflightId, and it must still be valid. See Pay with any x402 client.
Examples
Related
- selo test runs the paid release test.
- GitHub Action reference for the
preflightmode. - Payments and spend limits explains who pays what.