See it in action
New here? Watch the Song from the Headlines example drive the whole flow from a harness, end to end — then read on for the machine-readable version your agent follows (the video is the one part of this page a harness can’t consume).Song from the Headlines — a Catalog use case driven from a harness.
What the Catalog is
The Nevermined Catalog is a curated directory of external AI services your agent can pay for per call — no per-vendor signup, no subscriptions. Each service settles a single request through Nevermined using the x402 or MPP payment protocols. Your agent discovers a service, calls it, and the payment happens in the background against a budget you control.- Browse services: nevermined.app/catalog
- Machine-readable feed of every service: ai-catalog.json
- What “agentic commerce” means: nevermined.ai/glossary/agentic-commerce
The mental model
Five pieces, and it clicks:
The agent never holds card numbers or wallet keys and never calls Stripe or a chain directly. It holds an API key and a delegation; Nevermined does the rest.
Who does what
A human is needed only for the account, the money and the key. Everything else is the agent’s job — including creating the budget it spends within.
Ask a human only for the left column. Don’t wait for one to create the delegation.
Step 0 — One-time setup (the only human steps)
- App (sign in, keys, delegations): nevermined.app
- Live API base:
https://api.live.nevermined.app— your API key for this network is prefixedlive:(send the whole string, prefix included).
/auth/cli login). Don’t use the device flow (RFC 8628) here: like every OAuth-minted key, its key can’t create a delegation or pay through the Router’s delegation routes (403 BCK.OAUTH.0030). See Get a Nevermined API key for the embedded-login and SDK paths, and Authentication for the OAuth ones. Store it, reuse it, and keep it out of logs.
Or let your assistant get it for you. If your harness is an AI assistant that runs OAuth on your behalf — Claude (the claude.ai connector), ChatGPT, Claude Code, LangSmith Fleet, or another MCP host whose client Nevermined’s operator has listed (following the MCP authorization spec buys a host its identity, not this authority — an unlisted host is refused at the consent screen) — you skip the key, and Step 1’s delegation: add the Catalog MCP with no key, and the assistant sends you to Nevermined to approve a spending cap once — when you add the server on the strict host, on the first paid call on the public one. That approval is the delegation of Step 1 and the credential of this step, in one screen; the assistant renews the credential silently. The cap bounds what it can spend — not what the grant can see or do on your account (it reads your Router payment history and wallet balance, lists and can revoke your delegations, and can start a new delegation ceremony for you to approve); auth.md §6 has the full list. Which host and client each assistant uses (two of the four above need the strict mcp.api.<tier> host), and the mechanics the host follows, are auth.md §6. Funding is not skipped: a commerce grant spends stablecoin from your own wallet, so the next bullet still applies.
Fund a way to pay. A stablecoin method exists by default — fund it on the networks the Catalog settles on: Base and Tempo. Services settle on different rails (some on Base, some on Tempo), so keeping a small balance on both keeps any service payable — otherwise a call can fail simply because your funds are on the other network. To pay by card instead, enroll one once (a one-time in-browser step) — card enrolment funds the card rails only; a commerce grant from an assistant always spends stablecoin from your own wallet.
Step 1 — The agent creates its budget (the delegation)
The delegation is your capped, server-enforced spending authority (see the mental model above) — the single most important safety control here. With a plain API key, the agent creates it itself. This is not a human step.delegationId every paid call names (X-Router-Delegation-Id, or delegationId in a JSON body). erc4337 is the stablecoin delegation the Catalog’s rails pay from; it needs no card.
- Set the cap to the budget the user gave you (
spendingLimitCentsis in cents:100above is $1). It’s your spending limit: every price, the Router fee and any retries come out of it. Keep a soft stop a little below it in your agent so a run halts cleanly rather than erroring at the wall. - Count transactions for a retry.
maxTransactionscounts every paid attempt, including one the service then refuses, so set it above the number of calls you plan — or omit it and let the cap bound the spend. A transaction limit of exactly the planned calls can’t recover from one bad result. - Reuse before you create.
GET /api/v1/delegation?accessible=truelists the Active delegations your key can spend; reuse one with enough budget left. - Ask a human only when creating it answers
403 BCK.OAUTH.0030(your key was minted by OAuth — you need a plain key) or412with"error": "consent_required"(the account must accept updated terms in the app). Any other refusal here (a401for an invalid or expired key, for example): stop and report the exact error to the user. - Never create another delegation to get past a cap or budget refusal (
402 BCK.ROUTER.0003, even though its hint suggests creating one): report it and stop. The cap is the user’s decision.
setup_delegation tool, which returns a link for them to approve — but neither is required.
Step 2 — Discover services (free, no key required)
The catalog’s read surface is public — browse or filter it before spending a cent.- Human view: nevermined.app/catalog
- Full feed (all services): ai-catalog.json — for discovery; it carries no request schemas (see below)
displayPriceSource of settled or quoted (a settled price means real, multi-payer settlement — the service is genuinely used, not just advertised) and partner/featured flags you can weigh.
Step 3 — Connect the harness to the Catalog
Two paths — pick one:
Either way the shape is the same: name the service (by slug), pass your delegation, get the result back. The Router reads the vendor’s payment challenge, pays from your delegation, and returns the response.
Using the Catalog MCP
If your harness speaks MCP, the server drops discovery and payment in as native tools. Point your client at the server URL and put your Nevermined API key on theAuthorization header — or, in an assistant that runs OAuth (Claude, ChatGPT, LangSmith Fleet), connect by URL alone and approve a spending cap once:
https://mcp.sandbox.nevermined.app/mcp to rehearse. The tools your agent then has — discovery is free, the rest need the credential, and only pay_service / route_by_intent (with autoPay) move money:
Every argument, return field and refusal is in the Catalog MCP reference; the product page has the per-assistant setup walkthroughs.
The calling convention (one canonical shape)
If you drive the Router API directly, there is one convention in three forms — all settle identically; they differ only in how you pass the target and where the result comes back. Pick the one that fits your client. Full copy-paste curl lives in the Router quickstart; this is the map.
All three forms need the same two facts — which delegation pays and an idempotency id — but they carry them differently.
The JSON form (
/router/route) takes them as body fields: delegationId and requestId (both required — a header-only /route call fails validation), and returns the payment in the JSON response envelope (payment.paymentId, payment.status, payment.txHash, payment.failureReason).
The two transparent forms (/router/proxy, /router/svc) carry them as X-Router-* request headers instead, and return the payment as response headers:
The transparent response carries
X-Router-Payment-Id, X-Router-Payment-Status, X-Router-Tx-Hash, and — on a failed/unsettled payment — X-Router-Failure-Reason.
Paying with Nevermined credits
If the user holds Nevermined credits — the free credits a new account gets, top-up packs, or a Nevermined Subscription’s monthly allowance — some catalog endpoints can be paid with them instead of the delegation: Nevermined pays the merchant, the call costs a fixed number of credits with no routing fee, and the credits come back if the service doesn’t answer2xx. Credits pay only the endpoints that carry a rate, so keep a delegation for the rest.
Price a call in credits — this charges nothing. A listing’s USD priceLabel is not its credits price; don’t convert one into the other.
- Catalog MCP, connected with your API key:
get_serviceshowssubscription.creditsPerCallon each endpoint credits can pay (nosubscriptionfield means credits can’t pay it).quote_servicewithfunding: "subscription"prices one call. - REST:
GET /api/v1/subscription/catalog/creditslists every endpoint credits can pay, with itscreditsPerCall.POST /api/v1/router/subscription/quotewithslug,pathandmethodprices one call. - ARD discovery, with your API key: a keyed
POST /api/v1/ard/searchorGET /api/v1/ard/agentsread carriessubscription.creditsPerCallinline on each endpoint credits can pay (nvm:catalog.endpoints[].subscription), so the credits price comes back with discovery in one call. An unauthenticated read omits it — send your key to see it.
- The Catalog MCP connected with your API key, or through an OAuth connection the human allowed to spend credits (below).
pay_servicepays with credits by default when the credits and the endpoint qualify, and from the delegation otherwise. Passfunding: "subscription"to insist on credits; the result’sfundingandcreditsChargedsay what paid. POST /api/v1/router/subscription/routewithslug,path,method,bodyandrequestId— nodelegationId, no URL. The streaming form is/api/v1/router/subscription/svc/<slug>/<subpath>with anX-Router-Request-Idheader.
/router/route, /router/proxy, /router/svc) never spend credits. An OAuth connection (the claude.ai connector, ChatGPT, or a host connected through the OAuth consent) spends them only if the human ticked Let this assistant spend my Nevermined credits when connecting it; otherwise it pays from the cap the human approved, and the credits routes refuse it (403 BCK.OAUTH.0037, or 0030 for an OAuth key that isn’t a commerce connection). Use a personal API key and no X-Current-Org-Id header. GET /api/v1/credits/balance returns the credits that can pay now. Every rule and refusal code: Pay with Nevermined credits.
Async services (generate, then poll)
Some services are asynchronous — media generation, for example. The first call returns ataskId instead of the result, and you poll a status endpoint until the result appears. It is fully supported; keep these in mind:
- A placeholder
callBackUrlis fine. Some generators require the field even when you intend to poll — pass any well-formed URL; you do not need to receive the callback. - Know whether the status endpoint is paid or free. If it answers
402, each poll is a paid call (see the next bullet). If it is free (non-402) on a cataloged service, the Router relays only the status and withholds the body by default — the free-follow-up window is off unless the deployment enabled it and the merchant declared the path — so a free poll can return200with no result. Check the endpoint on the listing. - Give every poll a fresh
X-Router-Request-Id. The Router de-duplicates on that id, so reusing one makes each repeat a duplicate that is refused (409 BCK.ROUTER.0002, the originalpaymentIdinparams, no result) — it is not a new charge, but it never reaches the service either, so a naive poller stalls and never advances. A fresh id per poll advances it — and on a paid (402) status endpoint each real poll is a separately-billed call (the merchant charges per status check), so bound the number of polls against your delegation cap. (A free status endpoint relays withpaid: false— no charge.) The Catalog MCP’spay_serviceexposes afreshflag that mints the fresh id for you. - Read the generate and status endpoints — and the field that carries the
taskIdand the result — from the service’s detail (requestSchema/requestExample/responseSchema, via ARD/search·/agentsor MCPget_service).
The principles that make it smooth
These are the habits that turn trial-and-error into a clean run. Treat them as the manifesto:- Discovery is free — use it first. Confirm a service’s slug, price, and endpoints from the live feed before every task, and each endpoint’s request schema from a detail read (ARD
/search·/agents, or MCPget_service) before you call it. Prices and listings drift. - A failed call is not reliably free — don’t treat it as a cheap probe. Once the payment credential is minted, the merchant leg stands even if the upstream call then errors; only the routing fee may be released, and only on specific paths. Whether the merchant leg settles before or after the upstream
2xxdepends on the call mode. Confirm how a service wants to be called from its listing and docs, not by paying to find out — see when a fee is not collected. - Judge every result — on junk or a refusal, move to the next service. A
2xxis not proof the answer is useful. If the result is irrelevant or empty, or the service refuses the call (a 4xx:BCK.ROUTER.0019on/proxy·/svc, or a 4xxstatuswithbody: nullon/route), don’t stop and don’t report the junk as the answer. First tell a free refusal from a possibly paid one (see Step 4): a refusal that names no paymentId cost nothing, so fix the request and resend; a202, a5xxor any answer naming a paymentId may already have paid the merchant, so look the purchase up by its request id before doing anything else. Otherwise try the next matching service from discovery (or the nextshortlistentry from/router/select) as a new purchase with a fresh idempotency id. The cap is the budget, so retries come out of it (Step 1). - Address a service by its slug and let the Router resolve the endpoint. Don’t fight it with hand-assembled sub-paths — the common failure is a mis-resolved path, not a payment problem.
- Put target URLs in the request body, never in the path. A security guard blocks anything in the path that looks like it changes the destination host.
- Give every purchase a stable idempotency id. Reuse the same id when you retry, so a network hiccup never double-charges; use a fresh id only for a genuinely new purchase.
- Async services: poll, don’t wait on a callback. Synchronous services are simplest, but async ones (e.g. media generation) are fully supported — see Async services above. The one trap is a naive poller: give each poll a fresh idempotency id. Reuse one and the Router refuses each repeat as a duplicate (
409, no charge) so the poll never advances; a fresh id per poll advances it, and each paid (402) poll is a separately-billed call. - The delegation is the source of truth for spend. Reconcile against your delegation’s remaining budget, not a local tally.
- Prove the flow cheaply — payment is Live-only. Sandbox can rehearse the mechanics against its two free testnet test merchants, but no real service is payable there (its Router funds testnets only) — so validate discovery → pay → result end-to-end on Live with a small delegation cap and the cheapest sub-cent service before scaling spend up.
Step 4 — Track and reconcile spend
Read your delegation’s remaining budget and the Nevermined payment ledger to see exactly what each call cost and how much of the cap is left. This is also your audit trail. See the environment’s OpenAPI reference for the delegation and payment endpoints. A refused call is not always a free one. A refusal that names no paymentId — noX-Router-Payment-Id header, no payment in a /router/route reply, and no paymentId in the error’s params — cost nothing: fix the request and resend. Anything else may already have paid the merchant: a 202, any 5xx, or any answer that names a paymentId. A paid hop that gets no response, for instance, answers 502 BCK.ROUTER.0034 (or 0025 when its reply was too large to deliver) with the paymentId only in the error’s params. Before doing anything else, look the purchase up: GET /api/v1/router/payments?requestId=<your request id> — "presence": "absent" means nothing is recorded, so resend with the same id.
- A
202is still running — on/router/route, and on/router/proxy·/router/svcbefore the service starts answering. Poll itsresultUrl(theLocationheader on the streaming forms), and never buy it again. - A paid error is undecided, not proof of a charge. A paid call the service answers with an error other than
402staysIssueduntil Nevermined reconciles it, with its price reserved against your cap; if the merchant never collects, that reserve is released once the payment’s window closes, and if it did collect, the charge stands. A paid hop with no response is markedFailed, and the merchant may still have collected. Don’t count either as spent or as refunded yet. - Retry the same purchase only with the same
X-Router-Request-Id(orrequestId): the Router never pays one id twice. Leave room for any held reserve when you buy elsewhere.
/router/proxy or /router/svc (BCK.ROUTER.0019 / 0020) — on /router/route the same condition arrives as the envelope’s status with body: null, no typed code — status is the primary read — it is what you got (a non-2xx leaves the row unsettled). On the x402 rail there is also merchantSettlementObservedAt: when it is set alongside status: Issued/Failed, the merchant redeemed the payment on-chain and delivered nothing (charged-but-undelivered — worth alerting on). It is null on a clean settlement and on both MPP rails (which cannot record it), so null is not proof you weren’t charged — fall back to txHash / status there. Either way, the Router never takes its own routing fee for a call that did not deliver.
Safety & etiquette
- Live means real money. The Catalog is Live-only — keep delegation caps tight and rehearse with a sub-cent service before scaling.
- Mind the data. Some services return personal or third-party data; use them only where you have a lawful basis, and remember the query is sent to a third-party vendor.
- Protect the key. Never commit it, log it, or paste it into a shared transcript.
Links, in one place
- Catalog (browse): nevermined.app/catalog
- Catalog feed (all services): ai-catalog.json
- Using the Catalog from your web assistant (the no-code counterpart to this page): /products/catalog/from-your-web-assistant
- Catalog MCP: /products/catalog/mcp
- Router quickstart: /products/catalog/router/quickstart
- An agent buying on its own (worked end-to-end run): /products/catalog/router/agent-autonomy
- Nevermined app (sign in, keys, delegations): nevermined.app
- Get an API key / authentication: /integrate/authentication/overview · the agent-facing manifest: nevermined.app/auth.md
- x402 explained: glossary · reference: /api-reference/typescript/x402
- Stablecoin payments: /integrate/patterns/stablecoin-payments
- Docs index: /getting-started/overview · SDK/API index: llms.txt
- API reference (OpenAPI JSON): docs-json
- GitHub: nevermined-io · Contact: nevermined.ai/contact-us