Skip to main content
Price one call to a service without paying it: it charges nothing, signs nothing, and reserves no budget. Pass exactly what you’d pass to pay_service; the Router sends that request to the service unpaid, reads the price, and returns a quoteId plus the fee-inclusive total. Needs a credential (API key or OAuth commerce grant). Auth: key / grant · Charges: nothing
A quote contacts the service. To read the price, the Router sends your request to the service unpaid — the same request a payment starts with. A service that doesn’t charge for it performs it, so take care quoting a method with side effects. The service’s response is never returned to you. A quote also spends the same per-service rate limit as a payment, so quote once per decision; don’t poll.

Arguments

Returns

The rail, the merchant amount, and the fee-inclusive total. fee.capChargedCents is whole cents rounded up; fee.capChargedMicros is exact (1/10,000 of a cent):
  • optionSet: "delegation" — the delegation pay_service would charge, named in delegationId.
  • optionSet: "deployment" — you have no delegation yet, so this is what a personal crypto delegation would select; nextTool is setup_delegation. Set one up and quote again before paying — the delegation you create can select a different rail and price.
  • paymentRequired: false — the service didn’t ask for payment for this request; upstreamStatus is its answer. A non-2xx usually means the path, method or body is wrong.
  • sessionDeposit, present when settlement.scheme is session, is what this call would do to your wallet on top of its price. The service is paid out of a deposit in a payment channel, and that deposit can far exceed the price of the call. It is locked, not spent, it isn’t charged to your budget, and what the service doesn’t use comes back when the channel closes, idleCloseSeconds after its last use. Tell the human before paying.
To pay with the quote pinned, pass quoteId to pay_service before expiresAt with the exact same call arguments. The quote id fixes the challenge and the exact fee-inclusive total; keep maxTotalCents as an independent ceiling.

Quote in subscription credits

When your Nevermined credits can pay this call — from a subscription, free credits or top-up packs — quote_service answers with the exact credits of this request. Credits follow each service’s live price, with a 1-credit minimum, so the service is sent your request unpaid, as for a delegation quote: pass everything you would pass to pay_service, and the warning above applies:
credits is what this exact request costs now. There’s no quoteId or cent total: pay with pay_service, the same arguments and the maxCredits this answer gives, so a call that has become dearer is refused and charges nothing. paymentRequired: false means the service did not ask to be paid for this request: it named no price, credits is 0, and upstreamStatus is its answer. For a subscriber in good standing, the quote doesn’t check the credits left (without one, it checks that they cover the call, unless an automatic top-up would); it never checks Nevermined’s treasury — pay_service checks that when it makes the call. funding follows the same rules as on pay_service: omitted, a call credits can’t price gets the delegation quote instead, with fundingReason; with funding: "subscription", it is refused with the same error names.

Refusals (all charge nothing)

Try it

Ask your assistant:
Quote a current-weather call to openweather-mpp for Lisbon before paying.
Call it directly (charges nothing, but reaches the service — see the warning above):