Preflight (Dry Run)
Preflight answers “what would actually happen if I called this paid endpoint right now?” It runs the same wallet selection, caps, and fundability checks as a real call, but performs no on-chain transfer, no upstream call, and no settlement. Use it before high-cost or batched calls so an agent can make a budget decision without probing with real money.Two ways to preflight
Add the dry-run header to any paid route:X-Apiosk-Dry-Run: true
and is never cached.
The verdict
Preflight models the x402 and SEPA rails; a real call may still settle over
credits when preflight reports x402/sepa. Pin a rail with
X-Apiosk-Rail
(x402 or sepa) to test one path in isolation.When to preflight
- Before any call above ~$0.10, or a batch of more than five calls to one slug.
- After a budget or mandate change, to confirm the buyer is still ready.
- Instead of a real call when you only need to learn the price, combine with
GET /v1/apis/{slug}.
Related links
- Gateway skill: /guides/gateway-skill
- Payment options: /guides/payment-options
- Errors and retries: /guides/errors-and-retries