This page is for sellers/builders — publishing an agent so others can pay for it. If you only want to buy or use an existing agent, you don’t need to register anything or create a plan: see Buy & Call a Paid Agent.
Nevermined App
Go to the Nevermined App and click on “My agents” or “My pricing plans” to create Payment Plans and register your AI Agents.
Payments Libraries
Use the Payments Libraries to programmatically create Payment Plans and register AI Agents.
In this guide, we will focus on how to register AI Agents and create Payment Plans using the Payments Libraries.
Creating a Payment Plan
Payment Plans give AI Builders the ability to control how and when users can use an AI Agent or service. They are entirely controlled and managed by the AI Builder that creates them with no interference from Nevermined. Nevermined Payment Plans enable time-based or request-based gating of an AI Agent.Creating Credit-Based Plans
Provides user access with per-request pricing. Builders can manage the cost per request to access their AI service. This is done by setting the price to purchase a bundle of credits and the number of credits redeemed for each request (as configured during Plan creation). Each time a request is made, user credits are validated and redeemed. If the user does not have enough credits, they will be prompted to purchase more and denied access until they do so.- TypeScript
- Python
Creating a Credits Plan in EUR/EURC
You can also create plans priced in EUR (fiat) or EURC (Euro stablecoin):- TypeScript
- Python
Creating a Time-Based Plan
Provides user access on a time-gating basis. Builders can set the time period that a user is allowed access to the AI (e.g. 1 year, 1 month, 1 hour, etc.). When a user makes their first request, the corresponding access credit is redeemed, granting access for the designated period. Once the time period has elapsed, the user will no longer have access and will need to redeem another credit for continued access.- TypeScript
- Python
Creating a Trial Plan
A Trial Plan is a special type of Payment Plan that allows users to try out an AI Agent for a limited time (typically for free). A Trial Plan can only be obtained once by each user. There are two types of trial plans:Credits-Based Trial Plan
Perfect for giving users a fixed number of free credits to test your service:- TypeScript
- Python
Time-Based Trial Plan
Perfect for giving users free access for a limited time period:- TypeScript
- Python
Creating a Pay As You Go Plan
Pay As You Go plan is a type of payment plan that allows users to pay for each request they make to an AI Agent without having to purchase a bundle of credits upfront.- TypeScript
- Python
Registering an AI Agent
To register an AI Agent you only need a name, a description, and at least one Payment Plan to associate with it. The API attributes that describe how requests authenticate are configured inagentApi — most builders only need authType plus a credential.
Before registering an AI Agent, you need to have a Payment Plan created.
- TypeScript
- Python
Additional Security: Endpoint Allowlist (opt-in)
If you want the Nevermined platform to enforce a route-level allowlist on top of your library middleware, provideendpoints (TypeScript and Python) and, for public routes, openEndpoints (TypeScript) or open_endpoints (Python). When set, only requests matching one of the configured entries are accepted during x402 verification; non-matching requests are rejected. You can also publish a discoverable agent definition by setting agentDefinitionUrl (TypeScript) or agent_definition_url (Python).
- TypeScript
- Python
Existing agents registered before April 2026 still have these fields populated and continue to enforce the allowlist as before. No migration is needed.
Register an AI Agent and Payment Plan in One Step
This method allows you to create the plan and attach the agent to it in one step.
accessLimit parameter is optional. If not specified, it is automatically inferred based on creditsConfig.durationSecs:
"credits"ifdurationSecs === 0n(non-expirable plans)"time"ifdurationSecs > 0n(expirable plans)
- TypeScript
- Python
Key Concepts
Endpoint Protection (opt-in)
The fields below are part of the optional Additional Security allowlist described above — they only apply when you explicitly populateendpoints and/or openEndpoints (TypeScript) / open_endpoints (Python). For most builders integrating via the Payments library middleware, route-level gating is handled by your application code and these fields can be omitted entirely.
- Protected Endpoints (
endpoints): URLs that require a valid Payment Plan subscription. When present, x402 verify accepts only requests matching one of these entries. - Open Endpoints (
openEndpoints/open_endpoints): URLs that are publicly accessible (e.g., documentation, health checks). - URL Patterns: Support wildcards for dynamic routing — see below.
URL Patterns (path-to-regexp)
We usepath-to-regexp to define and validate the URL patterns of your agent endpoints. This allows dynamic routing via named parameters and wildcards. See the project documentation for full syntax and options: path-to-regexp.
- Wildcard example:
agents/ and captures them into the path array.
- Parameters example:
agentId and taskId as named parameters.
Payment Plan Types
Credits-Based
Sets the price per-request. Users buy a bundle of credits that are redeemed against usage.
Time-Based
Users get unlimited access for a specific time period (hours, days, months).
Trial Plans
Free access for limited time or credits to let users test your service.
Pay As You Go
Pay for each request they make to an AI Agent without having to purchase a bundle of credits upfront.
Best Practices
Plan Naming
Plan Naming
Use descriptive names that clearly indicate what the plan offers (e.g., “Basic API Access - 1000 requests”).
Pricing Strategy
Pricing Strategy
Start with competitive pricing and adjust based on usage patterns and user feedback.
Endpoint Design
Endpoint Design
Group related functionality under the same payment plan to provide better value to subscribers.
Trial Plans
Trial Plans
Always offer trial plans to reduce barriers to entry and increase conversion rates.
Next Steps
Once you have registered your agents and plans, you can:Test Purchasing
Learn how users purchase your payment plans
Handle Requests
Implement request validation in your AI agent