Introduction
Monetize Any API in 60 Seconds
xAPI-Fi is the Stripe for Web3 APIs - instant monetization infrastructure for the AI and data economy. Transform any API endpoint into a monetized, x402-enabled service with one line of code.
What is xAPI-Fi?
xAPI-Fi provides a simple, developer-first way to add payment gates to your API endpoints. Whether you're building AI services, data APIs, or any other service, xAPI-Fi handles the payment infrastructure so you can focus on building great products.
Key Features
- ▹One-Line Integration: Add payment gates to any endpoint with a single middleware
- ▹Instant Settlement: Automatic payment verification and real-time deposits via x402 protocol
- ▹Usage Analytics: Track revenue, requests, and user behavior in real-time
- ▹Flexible Pricing: Support for pay-per-call, tiered subscriptions, or dynamic pricing
- ▹Developer First: TypeScript SDK with comprehensive documentation
- ▹Enterprise Ready: 99.9% uptime SLA and white-label options
How It Works
- ▹Install the SDK: Add
@xapi-fi/sdkto your project - ▹Protect Your Endpoints: Wrap your API routes with the xAPI-Fi middleware
- ▹Get Paid: Users automatically pay when they call your endpoints
- ▹Track Performance: Monitor usage and revenue in your dashboard
Quick Example
terminal
import XAPIFi from '@xapi-fi/sdk/server';
const xapi = new XAPIFi({
apiKey: process.env.XAPI_FI_KEY
});
// Express
app.post('/api/generate',
xapi.protect({ price: 0.001 }),
async (req, res) => {
const result = await generateContent(req.body);
res.json(result);
}
);
Why xAPI-Fi?
Traditional payment infrastructure is complex and slow. Credit card processing takes days to settle, has high fees, and requires extensive compliance work. xAPI-Fi leverages the x402 protocol to provide:
- ▹Instant settlement: Payments clear in seconds, not days
- ▹Low fees: Micropayments are finally economical
- ▹Global access: Anyone with a Web3 wallet can use your API
- ▹No compliance burden: x402 handles the complexity
Next Steps
- ▹Getting Started - Set up your development environment
- ▹Quickstart - Build your first monetized API in 5 minutes
Support
- ▹NPM Package: npmjs.com/package/@xapi-fi/sdk
- ▹Twitter: @xapifi