Back to Home

Interactive Examples

Explore real use cases and learn how to integrate x402 into your projects

Pay-Per-Use API

Monetize your API by charging per request

Content Paywall

Protect premium articles and content

Autonomous AI Agent

AI agent that automatically pays for services

Micropayment System

Charge cents for each user action

More Use Cases

Video Streaming

Charge per minute of video consumed in real-time

File Downloads

Monetize downloads of datasets, models, or resources

Machine Learning API

Charge per ML/AI model inference

Data Marketplace

Sell access to datasets and data APIs

Computing Services

Charge per CPU/GPU time used

IoT & Sensors

Monetize IoT device data in real-time

Integration in 3 Steps

Start receiving payments in minutes

1

Install the library

npm install @viainti/x402
2

Configure middleware

Add one line to your middleware.ts

3

Receive payments

Your APIs are ready to monetize