commerce OAuth grant that enabled credit top-ups at consent).
Turning top-ups on and setting the monthly limit stay with the human, in the Nevermined App — this tool charges a pack within that limit, it does not create or change it. With your own API key and top-ups on, a credits call that runs out charges a pack on its own (see pay_service). Through an OAuth connection it never does — so for an OAuth-connected agent (the Claude.ai, ChatGPT or Fleet connectors) top_up_credits is the only way to get a pack. Either way, call it to refill before a call, so the credits are in place when you make it.
Auth: key / grant (grant must allow top-ups) · Charges: real funds, the human’s card
Arguments
Returns
The pack’s result and where your top-up spend stands this month. Dollar amounts are before tax. The MCP relays the API body unchanged and adds aninstructions string — follow it.
creditsAddedis a decimal string, set on everybought— replayed or not. Onlyreplayed: falsemeans this call charged the pack;replayed: truemeans thisrequestIdhad already bought one and nothing new was charged.operatorUrlis a link to hand the human; it’s set onneeds_attentionanddisabled,nullotherwise.- A pack was charged on
boughtwithreplayed: false, is being or may have been charged onpending, and may have been charged on aneeds_attentionwhosemessagesays the outcome is unconfirmed. Every other status charged nothing. Relaymessageto the human whenever a pack was or may have been charged.
GET /api/v1/credits/topups/pack (enabled, monthlyLimitUsd, maxMonthlyLimitUsd, boughtThisMonthUsd, packPriceUsd, paused) — it serves both credential kinds. (The topups block on GET /api/v1/credits/balance carries the same, but balance takes a plain API key.)
Outcomes
Readstatus (see the charge rule above — bought/pending/unconfirmed needs_attention are the ones where the card may have been touched).
Errors
A refusal comes back as anerror result, not an HTTP status (through the MCP tool you never see one) — each carries a code, a message and an instructions string; follow instructions:
{ "error": "topup_failed", "code", "message", "instructions" }— the top-up was refused. Coded consent/credential refusals:BCK.OAUTH.0040(the grant lacks top-up consent),BCK.OAUTH.0030(not a commerce grant),BCK.OAUTH.0038(an organization context), and404 BCK.CREDIT_TOPUPS.0001(top-ups aren’t available to this account or deployment).{ "error": "topup_unsupported" }— this deployment’s API is too old for top-ups.- a credential-refused result — re-authorize, or set your API key.
An OAuth grant needs Let this assistant top up my Nevermined credits ticked at consent, separately from the credit-spend box. A grant allowed to spend but not to top up is refused here with
BCK.OAUTH.0040; a top-up-only grant can’t spend (BCK.OAUTH.0041 on the stablecoin routes, BCK.OAUTH.0037 on the credits route). Reconnect with the right boxes — see Who can spend your credits.Try it
Ask your assistant:My credits are low and the next call needs about 1,000. Top up within my limit, then make the call.Call it directly (⚠️ charges the human’s card — rehearse on
https://mcp.sandbox.nevermined.app/mcp first):
POST /api/v1/credits/topups/pack with the same { "requestId", "forCallCredits" } body and your API key.