Skip to main content
Start here: need to register a service and create a plan first or get your Nevermined API Key? Follow the 5-minute setup.
Complete Python quick start for adding payments to your AI agent or service.

Installation

Environment Setup

Complete Example

Run the Example

Test the Flow

1) Register your agent (first time only)
Save the returned agent_id and plan_id to your environment. 2) Try without payment
3) As a subscriber, purchase and query
For agents that run continuously, set up a delegation when generating the access token — the facilitator tops up credits automatically when the balance runs out, with no manual order_plan() loop needed. See Automatic Credit Top-Ups.

Flask Alternative

Project Structure

Requirements File

Next Steps

FastAPI Integration

Complete FastAPI patterns and best practices

Python SDK Reference

Full API documentation

Payment Patterns

Advanced patterns for production

x402 Protocol

Implement HTTP 402 payment flows