Skip to main content
POST
Quote a call in subscription credits

Authorizations

Authorization
string
header
required

Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Settings > API Keys.

Body

application/json
slug
string
required

Catalog slug of the service to call. Subscription credits pay catalog services only, addressed by slug; the Router resolves it to the merchant server-side.

Pattern: ^[A-Za-z0-9._~-]+$
Example:

"webscrape-pro"

path
string

Subpath of the endpoint to price, as on the route (path segments only).

Maximum string length: 2048
Example:

"scrape"

method
enum<string>
default:GET

HTTP method of the call to price.

Available options:
GET,
POST,
PUT,
PATCH,
DELETE

Query string without the leading ?, as you will send it on the call. With live pricing the merchant prices this exact request.

Maximum string length: 2048
Example:

"q=nevermined&limit=1"

headers
object

Headers you will forward to the merchant (e.g. its own auth). The quote sends them with the unpaid request. Optional.

body
any

Request body you will send (JSON). Many services price by the request, so send the same body as the call. Optional.

credentialHeader
string

Header the payment credential rides in on the paid hop, when the merchant needs its own Authorization too (a separate Payment header is the common one). Send the same value as on the call. Do not set it by default.

Maximum string length: 64
Example:

"Payment"

requireProtocol
enum<string>

Binding payment-rail pin: the quote prices the rail the call would pay on, with no fallback. If unavailable, 409 BCK.ROUTER.0045. Quote and pay with the same pin.

Available options:
x402,
mpp

Response

The exact credits this request costs now, whether the merchant asked to be paid, and the status it answered the unpaid request with.

slug
string
required

The catalog slug priced.

Example:

"webscrape-pro"

credits
integer
required

The exact credits this request costs now, from the merchant's live price with a 1-credit minimum. 0 when paymentRequired is false: the merchant named no price for this request, which is not a promise that the call is free. Read upstreamStatus.

Example:

216

paymentRequired
boolean
required

Whether the merchant asked to be paid. False means it did not answer 402, so this request would not be paid with credits as it stands.

upstreamStatus
integer
required

The status the merchant answered the unpaid request with.

Example:

402