Skip to main content
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 with live.
  • 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.
  1. 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 on 127.0.0.1 and send your human to https://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 as Authorization: Bearer <api-key> on every Nevermined call.
  2. 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 to https://embed.nevermined.app/cards/setup?sessionToken=<token>&returnUrl=...&state=<random>&provider=stripe.
  3. Create a spending delegation (programmatic): POST https://api.live.nevermined.app/api/v1/delegation/create with {"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.
  4. Mint an x402 access token (programmatic, repeatable): POST https://api.live.nevermined.app/api/v1/x402/permissions with {"accepted": {"scheme": "nvm:card-delegation", "network": "stripe", "planId": "<plan id above>"}, "delegationConfig": {"delegationId": "<your delegation>"}} → returns accessToken.
You do not call 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 the payment-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

Response 201:
Store 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):
Response 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-required header — 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.

Reference