Skip to main content
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 exits 3 before any request, for example the 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 answers 400 VALIDATION_FAILED and the CLI exits 3.
  • A relative path resolves against the directory you ran the command in.

What Selo checks

The CLI sends POST /v1/preflight with authorizationId, targetUrl, method and, when you pass --body, requestBody. Selo then:
  1. checks that the target is an https URL on a public hostname on the default port;
  2. checks that a verified, unexpired authorization covers the target’s origin, route and method;
  3. sends one unpaid request to your endpoint and reads its x402 challenge;
  4. checks that the challenge offers an exact payment in USDC on the Algorand network Selo pays on;
  5. checks that your price fits the per-job limit on what Selo may spend on the target (0.50 USDC on the public API);
  6. when the target is eligible, looks it up in the Bazaar catalog for the later discovery check.
See Run a preflight for the guide and Pricing and limits for every limit.

Output

Eligible

The CLI prints five lines on stdout and exits 0:
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 exits 3:
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