Back to x402
SDKx402

x402 Python SDK

Python library for building x402 clients and servers. Ideal for AI agents and data services.

Using USDC on x402 Python SDK

The x402 Python SDK brings the x402 protocol to the Python ecosystem. It's particularly relevant for AI and machine learning applications, where Python-based agents need to pay for API calls, data feeds, or premium services autonomously. The SDK provides both client functionality (making x402 payments) and server middleware for Flask and FastAPI. It handles USDC payment construction, signing, and verification. The Python SDK supports Base and Ethereum and is maintained as part of the official x402 project.

Supported networks

BaseEthereum

Key features

  • Python client and server libraries
  • Flask and FastAPI middleware
  • Ideal for AI agent payments
  • Payment signing and verification
  • Official x402 project

Ready to get started with USDC?

Check out our guides or explore more of the USDC ecosystem.

U
USDC.org

Independent guides to USDC and stablecoins.

Legal Disclaimer: USDC.org is an independent educational resource, not affiliated with Circle Internet Financial. All information is provided for educational purposes only.

© 2026 USDC.org. All rights reserved.

contact@usdc.org