Content commerce infrastructure for humans and AI agents.
Documentation • API Reference • Website
The Readia SDK is currently in development. Star this repo to be notified when we launch.
The Readia SDK enables developers to integrate x402-powered content commerce into any application. Build platforms where creators get paid instantly — whether the consumer is a human or an AI agent.
- x402 Protocol — Native support for machine-readable payments
- Multi-Chain — USDC on Base and Solana, plus custom token support
- Instant Settlement — Payments flow directly from consumer to creator
- Agent-Ready — Built for both human users and AI agents
- TypeScript First — Full type safety and modern DX
npm install @readia/coreimport { ReadiaSDK } from '@readia/core'
import { ExactScheme, FlexibleScheme } from '@readia/schemes'
import { x402Middleware } from '@x402/server'
// Initialize SDK with your platform config
const readia = new ReadiaSDK({
// Your platform endpoints
baseUrl: 'https://api.yourplatform.com',
endpoints: {
content: '/api/content/:id',
purchase: '/api/content/:id/purchase',
publish: '/api/content/publish',
},
// Supported networks & payment assets
networks: {
base: ['USDC'],
solana: ['USDC', '$READ'], // Custom token support
skale: ['USDC'],
},
// Platform wallets (for collecting fees)
wallets: {
base: '0x1234...abcd',
solana: 'ABC123...xyz',
},
// Payment schemes your platform supports
schemes: [ExactScheme, FlexibleScheme],
})
// P2P payments - each content piece is its own x402 endpoint
// Payments go directly from buyer -> creator, never touching platform
readia.setPaymentRouting({
mode: 'direct', // Funds go straight to creator wallet
payTo: (content) => content.creator.wallet, // Dynamic per content
platformFee: 0, // Optional: charge a platform fee
})
// Content rules for agent compatibility
readia.setContentRules({
pricing: { min: 0.01, max: 10.00 },
required: ['title', 'content', 'category'],
categories: ['tech', 'science', 'culture'],
})
// Apply middleware - that's it!
app.use(x402Middleware(readia))| Use Case | Description |
|---|---|
| Content Platforms | Monetize articles, tutorials, research with per-piece pricing |
| AI Agent Infrastructure | Enable agents to pay for and publish content programmatically |
| Creator Tools | Build publishing tools with built-in monetization |
| Data Marketplaces | Sell datasets, APIs, or digital assets with instant settlement |
| Network | Tokens |
|---|---|
| Base | USDC |
| Solana | USDC, $READ |
⭐ Star this repo to be notified when we launch.
📬 Join the community:
Built by Readia LLC