How to accept payments in your Super Agent AI application
Here's a short video of How a Super Agent AI agent can be used by a subscriber and monetized:
If you want to see how an AI Publisher can monetize their Super Agent AI services, please take a look at the rest of the tutorial.
Step 1 - Set up your Builder Account in Nevermined and a Smart Subscription
In a previous tutorial we showed how to setup your Nevermined account and how to create a Smart Subscription. Here we go through the required steps of registering a new AI agent existing on Super Agent and linking it to your Smart Subscription. User who purchase a subscription will get access to the Super Agent AI service that is included in the subscription plan.
You can't register an AI Service without first configuring a Smart Subscription. So if you skipped that part, please go to the tutorial about How to create a Smart Subscription first.
Step 2 - Register your Super Agent AI service
-
Next, you need to register the Super Agent AI service and link to your Smart Subscription. To do this, click in the "New +" button of the header.
-
You will see a page where you can select the type of asset you want to create. Select the "AI Apps/Agents" option.
- You start by describing the AI Agent you want to register. To do this, provide a Title, Description and cover image for the AI service.
-
Next, add your specific AI service information via your AI’s API information. It's highly recommended to provide the OpenAPI document of your AI service. This will automatically import the information about the endpoints of your AI service. If your service does not provide an OpenAPI documentation, you can add the endpoints manually. Just add one or more endpoint API of your AI service or agent (e.g.
https://myapi.example.com/v1
) using the “+” button.In this case, Super Agent provides the OpenAPI document of the AI service, which makes it nicer to import and use. You can find here Super Agent OpenAPI.
-
Now add what type of security mechanism you’d like to enforce for User Authentication to your AI app. The options include:
- No authentication
- Basic Authentication with a username and password
- Bearer Token authentication with designated access token.
Please note that Nevermined fully encrypts the Bearer Token information that you submit so that this information is never disclosed to anyone but yourself.
- Now select the subscription plan that you created earlier and attach your AI service to this plan. This will enable the controls you’ve set for your AI app using this service. In this step you can also set the number of credits needed for each user to make one request for this AI service.
- Lastly, review your AI-agent setup and click “Create”.
- Once you’ve successfully created the AI service, you can see its widget by clicking the “See the asset” button.
Step 3 - Get your Super Agent Embeddable Widget
- To create your embeddable widget of your Super Agent AI, you just need to go to your personal area and generate one.
- You can find all the details in the How to integrate a widget in your website tutorial.
Embedding the Super Agent Widget into your Website
Here is a example of a code generated:
<div class="nvm-one-widget" nvm-did="did:nv:017a98cc62944d4dccb15168bfd2ec4ae2c7754a1d4927112e21cc946adefdc9" nvm-wid="wid-28df8bed-5792-4c18-bd1d-bce81b3cb266" nvm-theme="dark" nvm-layout="horizontal"></div>
<script defer src="https://widgets.testing.nevermined.app/nvm-one-widget-loader.js"></script>
And here is how the widget looks like once integrated in a website:
Send us via Discord your integration! We will be happy to share it with the community.