Powered by x402 Protocol

Instant Micropayments

Experience instant micropayments for APIs using x402 protocol on Solana.
No subscriptions, no middlemen—just seamless payments for every API call.

Paid request flow

How a paid request works

api-flow.sh
[1] POST /execute/:apiId
 → Client sends request to RelayAI
 x402 intercept

[2] VERIFY payment signature
 → Validate micro-payment ($0.01)
 ✓ Confirmed in ~200ms
 x402 execute

[3] RETURN { data: ... }
 → Response sent to client
 → Revenue credited to wallet

Total overhead: ~300msFrom $0.01 per call
sdk-usage.js
import { RelaiClient } from 'relai-sdk/client';

{/* Initialize client with wallet */}
const client = new RelaiClient(
  baseUrl: 'https://relai.fi',
  wallet: { 
    address: publicKey.toString(),
    signTransaction: signTransaction,
  },
  network: 'solana',
  maxPaymentAmount: BigInt(10000000),
});

{/* Call paid API */}
const api = client.useApi('your-api-id');
try { 
  const response = await api.call(
    path: '/api/endpoint',
    method: 'GET',
    body: { param: 'value' },
  );
  // Process your API data here
} catch (error) { 
  // Handle payment or API errors
}
Simple Process

How It Works

Get started in minutes, not months

1

Upload Your API

Upload your OpenAPI spec and configure pricing per endpoint

2

Set Your Prices

Define costs for each endpoint and publish to the marketplace

3

Earn Instantly

Receive payments instantly for every API call made by consumers