Skip to main content
The Nevermined Router is the buyer side of Nevermined. It lets your agents pay for external services that were never onboarded to Nevermined — any endpoint that speaks the x402 protocol or the Merchant Payment Protocol (MPP). Your agent authenticates with its Nevermined API key and spends against a Delegation — a budget with a hard cap and an expiry. The Router does everything else: it reads the merchant’s payment challenge, signs the payment from your custodial wallet, enforces the cap, and records the spend on one unified ledger. Your agent never holds a private key, never learns a payment protocol, and never needs an account with the service it just paid.
The Router is how you pay for services you find in the Nevermined Catalog — the curated directory of external x402 and MPP services. Discover a service there, then route the payment here.

What this is not

Nevermined has two halves, and it’s worth being precise about which one you’re reading: If you’re monetizing an API, you want the Facilitator. If you want your agent to go buy things, you’re in the right place.

Why route payments instead of paying directly

One budget, every rail

A single Delegation covers x402 and MPP alike. Your agent doesn’t branch on protocol, and you don’t reconcile two sets of books.

No per-provider accounts

Pay-per-call services need no signup, no API key, and no subscription. The payment is the authentication.

A hard spending cap

The Delegation is enforced server-side, per payment. An agent cannot exceed it — not by looping, not by retrying, not by being wrong.

One audit trail

Every payment across every protocol lands on the same ledger, exportable as JSON or CSV.

Which services you can pay

You do not need to know which one a service speaks. In the recommended call mode the Router probes the service, detects the protocol from its 402, and pays it. The detected protocol always wins over anything you declare. Services that authenticate with a conventional API key and bill you monthly are a different shape entirely — there is no per-request price on the wire and nothing for the Router to pay. Those aren’t routable today.

What it costs

A routed call can cost you more than the merchant’s price, and the two are charged separately:
  • The merchant’s price — whatever the service asked for in its 402. Paid in full; the Router never takes a cut of it.
  • A Nevermined routing fee of 5% of that price. Added on top, so a 1.00calldebitsyourDelegationcap1.00 call debits your Delegation cap 1.05 while the merchant still receives their full $1.00.
Every payment response carries a fee object saying exactly what was charged, and fee.capChargedCents — not settlement.approxCents — is the figure your budget actually moved by. See the routing fee for how it is applied and rounded, and the ledger for reading it back per payment.
The rate is returned as fee.bps on every payment response — 500 basis points over a 10,000 denominator. Read it from there rather than hard-coding it.

Environments

Both rails settle real value on public networks. The Router is a payment system, not a simulator — a call made against the live environment moves real funds to a real merchant. Start in sandbox, and keep your first Delegation cap small.

What you need before you start

1

A Nevermined API key

Sent as Authorization: Bearer <your-api-key> on every Router call. It must be a current-generation key — see the quickstart for how to tell.
2

A Delegation

Your budget. Created once, reused for every payment until it’s exhausted or expires.
3

A funded wallet

Both rails pull from your own custodial wallet, so it must already hold the payment asset on the network you’re paying on. The Router never holds or moves float on your behalf.

Let your coding assistant drive it

Everything on this page is also packaged as an AI coding skill — the machine-readable twin of this section, carrying the same facts and the same error codes. Install it once and your assistant knows how to discover a service, create a Delegation, make the paid call, and — just as importantly — when to stop rather than route around a refusal.
Cursor, Windsurf, Cline, Amazon Q, Codex and Copilot are covered too — see AI Coding Skill for the per-tool instructions, or read the skill itself.
Install nevermined-router when your agent is spending at external services. Its sibling, nevermined-payments, is for the opposite direction — receiving payments and buying Nevermined plans. Installing both is fine; they don’t overlap.

Next

Quickstart

From an API key to a paid call, in five steps.

How it works

The payment flow, the two call modes, and where custody sits.

Guardrails

What the Router enforces, what it refuses, and every error code it can return.

Payment ledger

Query, export, and reconcile everything your agents have spent.