Quote a Router call: the fee-inclusive price, rail and network, without paying
Ask what POST /route would charge for this call, WITHOUT paying it. The Router makes the same unpaid probe /route makes, reads the 402, selects the payment option exactly as a payment would (MPP first, then x402) and prices it with the Router fee — then stops. Nothing is signed, no credential is minted, no payment is recorded and no delegation budget is reserved, so no money moves. A quote is not free of consequence, though: the unpaid probe reaches the service (one that does not charge for the request performs it), and a quote spends the same per-key and per-service rate limit as a payment — so quote once per decision rather than repeating it.
Use it to decide whether ONE call fits the allocation you planned for it: compare fee.capChargedMicros (exact) or fee.capChargedCents (rounded up, the figure maxTotalCents is compared against) with what you want to spend, then call /route with maxTotalCents set to that figure so a price change between quote and call is refused rather than paid.
delegationId is optional. With it, the quote prices the options that delegation would select (an organization-wallet delegation pays only in its own currency, a card delegation pays over MPP-stripe, a recipient allowlist is enforced); without it, the options a personal crypto delegation would select. optionSet says which. A quote checks neither the remaining cap nor the wallet balance — those are the payment’s checks (BCK.ROUTER.0003, BCK.ROUTER.0009).
Provide the target url OR a catalog slug (+ optional path, search, method, headers, body), as on /route. A non-402 answer returns paymentRequired: false with the upstream status only — the upstream body and headers are never returned.
Request
- Base URL: https://api.sandbox.nevermined.app/api/v1
- URL: https://api.sandbox.nevermined.app/api/v1/router/quote
- Auth: HTTP bearer
Request body
Example request
{
"url": "https://agent.example/api/resource",
"slug": "webscrape-pro",
"path": "scrape",
"search": "flight_iata=AA217&limit=1",
"credentialHeader": "Payment",
"delegationId": "5e7481c3-e972-45bd-bdc5-a0b99c4de4a1"
}Response
The quote. paymentRequired: false means the upstream did not ask for payment; otherwise settlement and fee are what /route would pay and reserve.
Example response
{
"paymentRequired": true,
"upstreamStatus": 402,
"optionSet": "deployment",
"protocol": "x402",
"x402Version": 2,
"settlement": {
"recipient": "0x209693Bc6afc0C5328bA36FaF03C514EF312287C",
"amount": "1000",
"asset": "USDC",
"network": "base-sepolia",
"approxCents": "1",
"scheme": "exact"
},
"fee": {
"amount": "0",
"cents": "0",
"capChargedCents": "1",
"capChargedMicros": "2040"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.