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 the setup of time-based or request-based gating of a Builder’s AI.- Request-Based or Credits-Based: Provides user access with request-gating. Builders can set the target price per request by configuring how many credits each API call consumes. This allows you to control costs based on computational complexity - for example, a simple query might cost 1 credit while a complex analysis could cost 5 credits. When adding services to a Payment Plan, you define the number of credits required per request. Each time a request is made, Nevermined will redeem the specified number of credits. If the user does not have enough credits, they will be prompted to purchase more and denied access until they do.
- Time-Based: Provides user access with time-gating. Builders can set the time period that a user is allowed access to the AI (e.g., 1 year, 1 month, 1 week, 1 day, 1 hour, etc.). When a user makes a 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.
Creating a Credit-Based Payment Plan
- TypeScript
- Python
Creating a Time-Based Payment Plan
- 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.- TypeScript
- Python
Creating an AI Agent
Before creating an AI Agent, you need to have a Payment Plan created.
API Endpoint Configuration
When creating an agent, you need to specify:- HTTP methods and URL patterns that the agent exposes and are protected by the Payment Plan
- Wildcard support - You can use wildcards (like
:agentId) to match dynamic URL segments - Open endpoints - Specify any endpoints that should remain free (like documentation or health checks)
- TypeScript
- Python
Creating a Payment Plan and AI Agent Together
This method allows you to create the plan and attach the agent to it in one step.
- TypeScript
- Python
Key Concepts
Endpoint Protection
When creating an AI Agent, you specify:- Protected Endpoints: Require payment/subscription to access
- Open Endpoints: Free to access (e.g., documentation, health checks)
- URL Patterns: Support wildcards for dynamic routing
Payment Plan Types
Credits-Based
Users pay for a specific number of credits. Each request consumes credits based on your configuration.
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.
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 created your payment plans and agents, you can:Test Purchasing
Learn how users purchase your payment plans
Handle Requests
Implement request validation in your AI agent