Skip to main content
POST
Call a catalog service, paid with 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"

requestId
string
required

Idempotency key — REQUIRED. At most one payment per (caller, requestId): a retry is never paid twice.

Maximum string length: 256
Pattern: \S
Example:

"scrape-example-com-1"

path
string

Subpath of the endpoint, appended to the resolved merchant URL (path segments only — //, .., a backslash or an embedded absolute URL is refused).

Maximum string length: 2048
Example:

"scrape"

Query string without the leading ?, attached to the resolved merchant URL.

Maximum string length: 2048
Example:

"q=nevermined&limit=1"

method
enum<string>
default:GET

HTTP method to use for the upstream request.

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

Headers to forward to the merchant (e.g. its own auth). Optional.

body
any

Request body to forward (JSON). 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). Do not set it by default.

Maximum string length: 64
Example:

"Payment"

protocol
enum<string>
default:x402

Advisory: the Router detects the protocol from the merchant's 402.

Available options:
x402,
mpp

Response

The merchant's response (status, and body only when it delivered) plus the payment Nevermined made and the credits it cost.

status
number
required

The merchant's HTTP status.

body
any
required

The merchant's response body — null unless a paid call delivered (2xx), so a failed call reveals nothing about the merchant. A free answer relays only its status (paid: false), except a declared follow-up poll after a paid call.

paid
boolean
required

Whether a payment was made (false when the service answered free).

bodyEncoding
enum<string>

How body is represented. Absent when body is withheld.

Available options:
json,
text,
base64
contentType
string | null

The merchant's response media type, when body is relayed.

Example:

"application/json"

payment
object