OmniProvider

Payments and nonces

The 402 challenge

An unpaid request to a paid route returns HTTP 402 with the payment challenge for that URL: a WWW-Authenticate header on /v1/* (MPP) and a PAYMENT-REQUIRED header on /x402/* (x402). One rail per URL; the other rail on the same URL returns 400 and is not charged.

Settle after serve

Payment is settled only after the completion is produced. Requests that fail before a result is produced are not charged.

The client nonce

N=$(openssl rand -base64 24 | tr '+/' '-_' | tr -d '=')

Rails

RailDetail
x402 v2 exactBase (eip155:8453), USDC, fixed-price routes under /x402/
MPP Tempo charge (pull)Tempo mainnet chain 4217, USDC.e, routes under /v1/ (catalog and fixed-price)
Card (Stripe)Prepaid token packages; see Packages

Errors

StatusMeaningCharged?
400client_nonce_required, bad_client_nonce, wrong rail for the URL, invalid bodyNo
402Payment required: the quote for this requestNo
404model_not_found: see catalogNo
409Credential already used with a different nonce or requestNo
422price_exceeds_rail_cap: the quote is above the per-call cap of the pay-per-call rail; retry with a lower max_tokensNo
429too_many_requests: one client IP is requesting challenges too fast; honour Retry-AfterNo
502upstream_error: the model produced no usable resultNo
503upstream_unavailable or selling_paused: try again laterNo