Autonomous agents can purchase a Baselayer API key and run real business searches, paying per request via Nevermined’s card delegation. No Baselayer account or human sign-up is required.This page is an agent-facing integration guide. It covers (1) the one-time Nevermined payment setup and (2) the Baselayer endpoints you can buy and call.
Environment
- Baselayer agentic API base URL:
https://api.baselayer.com - Nevermined environment:
https://api.live.nevermined.app. Nevermined API keys for this network start withlive. - Payment scheme:
nvm:card-delegation(credit or debit card using Nevermined’s card delegation) - Payment plan: Baselayer Startup: $10.00 per 100 credits (plan details)
- Agent listing: Baselayer Business Search Agent
One-time payment setup
All payments go through Nevermined’s card delegation flow, built on the x402 protocol. Never call Stripe or any other payment API directly. A human is needed to create your Nevermined API key and to enroll a card. Everything after that is programmatic and reusable.- Get a Nevermined API key. A human signs in once at https://nevermined.app and creates an API key for the live environment (starts with
live). For a fully agentic handoff, use the embedded login flow: host a callback on127.0.0.1and send your human tohttps://nevermined.app/auth/cli?callback_url=http://127.0.0.1:<port>/callback. The key is delivered to your callback. Store it and send it asAuthorization: Bearer <api-key>on every Nevermined call. - Enroll a card (one-time, human required). Either directly in the Nevermined app (Payment Methods → Enroll card), or via the embedded flow: mint a session with
POST https://api.live.nevermined.app/api/v1/embed/session({"returnUrl": "http://127.0.0.1:<port>/callback"}), then send your human tohttps://embed.nevermined.app/cards/setup?sessionToken=<token>&returnUrl=...&state=<random>&provider=stripe. - Create a spending delegation (programmatic):
POST https://api.live.nevermined.app/api/v1/delegation/createwith{"provider": "stripe", "providerPaymentMethodId": "<pm_...>", "spendingLimitCents": 10000, "durationSecs": 604800, "currency": "usd"}. A delegation authorizes spending within a budget and time window. Reuse it until spent or expired. - Mint an x402 access token (programmatic, repeatable):
POST https://api.live.nevermined.app/api/v1/x402/permissionswith{"accepted": {"scheme": "nvm:card-delegation", "network": "stripe", "planId": "<plan id above>"}, "delegationConfig": {"delegationId": "<your delegation>"}}→ returnsaccessToken.
settle yourself for Baselayer. Our endpoints verify and settle server-side on every request. Your card is charged per request through your delegation; the settlement receipt comes back base64-encoded in the payment-response response header.
Buying and using Baselayer
Both endpoints require the x402 token in thepayment-signature header. Calling them without it returns HTTP 402 with a base64 payment-required challenge header describing the plan. Decode it to discover everything you need programmatically.
1. Purchase an API key: POST /alpha/api_keys
201:
key — it is a real Baselayer production API key.
2. Run a business search: POST /alpha/searches
Send both your x402 token (pays for the request) and your purchased key (identifies you):
201 (synchronous, full results in-line): SOS registrations, officers, watchlist screening, and match verdicts such as "business_name_match": "EXACT". Optional request fields include officer_names, website, phone_number, email, and tin — see the Search API reference for the complete schema.
Python example
Errors
- 402 +
payment-requiredheader — missing, invalid, or exhausted payment token. Decode the header, (re)mint a token, retry. - 404 within
/alpha— only the two endpoints above are served. - You are only charged for successful (2xx) requests.