
// Slap payment gates on your endpoints.
// Get paid in crypto. Automatically.
// No blockchain complexity. No bullshit.
[ Add payment gates to any endpoint with a single middleware ]
app.post('/api/generate',
async (req, res) => {
const result =
await generateContent(
req.body
);
res.json(result);
}
);app.post('/api/generate',
xapi.protect({
price: 0.001
}),
async (req, res) => {
const result =
await generateContent(
req.body
);
res.json(result);
}
);The most powerful API monetization platform in Web3