Use this file to discover all available pages before exploring further.
This guide provides a quick path to integrating Nevermined, whether you’re an AI Builder looking to monetize a service or a Subscriber wanting to access one. You can interact with Nevermined through our user-friendly Web App or programmatically via our SDKs.
The easiest way to get started is by using the Nevermined App to register your agent and create payment plans through a visual interface.
Log In: Access the app and connect your wallet.
Register Agent: Navigate to the “Agents” section and click “Register New Agent”. Fill in your agent’s metadata, such as name, description, and API endpoints.
Create Payment Plan: Define one or more payment plans for your agent, specifying price, currency (fiat or crypto), and usage terms (subscription or credits).
Done!: Your agent is now discoverable and ready to accept payments.
In your agent’s backend, add logic to validate requests from subscribers. This ensures that only authorized users can access your service.
// Example in an Express.js routeapp.post('/api/query', async (req, res) => { // Extract authorization header const authHeader = req.headers['authorization']; // For agents using Nevermined Proxy: // The proxy handles validation automatically // Just ensure your agent is registered with endpoints // For direct integration: if (!authHeader || !authHeader.startsWith('Bearer ')) { return res.status(401).json({ error: 'Unauthorized' }); } const token = authHeader.substring(7); // Validate the access token const validationResult = await payments.requests.isValidRequest( token, req.body ); if (!validationResult.isValid) { // Return 402 Payment Required with payment options return res.status(402).json({ error: 'Payment Required', plans: validationResult.plans }); } // Process the AI request const result = await processAIQuery(req.body.prompt); // Credits are automatically redeemed by the proxy // or you can manually redeem for direct integration res.json(result);});
This flow protects your agent and automates billing.