Quote a Router call from your commerce grant, without paying (OAuth)
The OAuth counterpart of POST /api/v1/router/quote, for a credential minted from a commerce authorization. Identical behaviour and identical response, with one difference: you do not choose the delegation. The quote prices the options the delegation your grant is pinned to would select, so it is what POST /api/v1/router/commerce/route would charge for the same call. Sending a delegationId is refused, not ignored.
Nothing is signed, no credential is minted, no payment is recorded and no budget is reserved. The Router still makes the unpaid request to the service, and the quote spends the same per-key and per-service rate budgets as a payment. Compare fee.capChargedCents with what you want to spend, then call /commerce/route with maxTotalCents set to that figure.
A plain (non-OAuth) API key cannot use this route: it has no grant to price. Use POST /api/v1/router/quote and name your own delegationId instead.
Request
- Base URL: https://api.sandbox.nevermined.app/api/v1
- URL: https://api.sandbox.nevermined.app/api/v1/router/commerce/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"
}Response
The quote. paymentRequired: false means the upstream did not ask for payment; otherwise settlement and fee are what /commerce/route would pay and reserve against the grant.
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.