Overview
The Nevermined Payments Python SDK (payments-py) is a Python library that provides tools for integrating AI agent monetization and access control into your applications. It supports:
- Payment plans (credits-based and time-based)
- AI agent registration and management
- X402 payment protocol
- MCP (Model Context Protocol) integration
- A2A (Agent-to-Agent) protocol support
Prerequisites
Before installing the SDK, ensure you have:- Python 3.10 or higher - The SDK requires Python 3.10+
- pip or Poetry - Package manager for installation
- Nevermined API Key - Obtain from the Nevermined App
Installation Steps
Using pip
Using Poetry
With Optional Dependencies
For FastAPI/x402 middleware support:Verify Installation
After installation, verify the SDK is working:Environment Setup
Create a.env file or set environment variables: