There is a gap in autonomous agent infrastructure that rarely gets discussed.
Agents can reason. They can call APIs. They can manage credentials and monitor their own revenue. But when it comes to moving value across chains — bridging tokens from one network to another - they still depend on a human to open a browser, connect a wallet, and click a button.
That is a manual step inside what is supposed to be an autonomous system.
The RelAI Management API now closes that gap. Bridge endpoints are live under /v1/bridge, accessible with a service key. Agents can query supported directions, get quotes, check liquidity, and execute cross-chain USDC transfers — all programmatically, without any UI involved.
What the Bridge API Does
The bridge moves USDC between supported networks. Today that includes:
| From | To |
|---|---|
| Solana | SKALE Base |
| SKALE Base | Solana |
| Solana Devnet | SKALE Base Sepolia |
| SKALE Base Sepolia | Solana Devnet |
The payment on the source chain uses the x402 protocol — the same mechanism that powers all monetised APIs on RelAI. The payout on the destination chain is handled by the RelAI bridge wallet. A small fee (0.1%) covers operational costs.
The Four Endpoints
List supported directions:GET /v1/bridge/networks
Returns all valid bridge directions with token addresses, chain metadata, and wallet connection data for adding new networks to MetaMask or Phantom.
Get a quote:
GET /v1/bridge/quote?amount=1&from=solana&to=skale-base
Returns the exact output amount after fees, broken down as inputAmount, outputAmount, fee, and feeBps. Always call this before executing — the agent knows exactly what it will receive before committing.
Check bridge wallet balances:
GET /v1/bridge/balances
Returns the available liquidity on each supported network. Useful for an agent to verify that the bridge can fulfil a transfer before initiating the payment.
Execute a bridge transfer:POST /v1/bridge/{direction}
Content-Type: application/json
{
"amount": "1",
"destinationWallet": "0xYourDestinationAddress"
}
This is the core endpoint. On first call (no X-Payment header), the server returns a 402 Payment Required response with x402 payment instructions. The agent constructs and signs the payment transaction on the source chain, then resubmits with the X-Payment header. The server verifies the payment on-chain and executes the payout on the destination chain.
How an Agent Uses It
The flow is straightforward. Here is a complete example in TypeScript using the RelAI SDK:
import { createX402Client } from "@relai-fi/x402";
const client = createX402Client({
serviceKey: process.env.RELAI_SERVICE_KEY,
wallet: agentWallet, // Solana or EVM wallet
});
// 1. Check what's available
const networks = await fetch("https://api.relai.fi/v1/bridge/networks").then(r => r.json());
// 2. Get a quote
const quote = await fetch(
"https://api.relai.fi/v1/bridge/quote?amount=1&from=solana&to=skale-base"
).then(r => r.json());
console.log(Bridge $${quote.inputUsd} → receive $${quote.outputUsd} after fees);
// 3. Execute — the SDK handles the 402 payment automatically
const result = await client.post("https://api.relai.fi/v1/bridge/solana-to-skale-base", {
amount: "1",
destinationWallet: "0xYourDestinationAddress",
});
console.log("Bridge complete:", result.txHash);
console.log("Explorer:", result.explorerUrl);
The SDK handles everything in the 402 flow: detecting the payment requirement, building and signing the transaction, and retrying with the payment proof. The agent treats the bridge like any other paid API call.
Why x402 for Bridge Payments
A traditional bridge has two on-chain transactions: the lock/burn on the source chain, and the mint/release on the destination chain. Coordinating these securely requires either a trusted relayer, a complex proof system, or a multi-sig.
The RelAI bridge uses a simpler model that is well-suited for USDC transfers at modest scale.
The source-chain payment is an x402 transaction — a standard USDC transfer to the bridge wallet, with payment metadata encoded in the transaction. The bridge server verifies this payment on-chain through the facilitator before releasing funds on the destination chain. No lock contracts. No burn mechanisms. No proof verification.
This means:
- No new contracts to audit. The only on-chain action is a standard USDC transfer.
- Immediate finality. Once the facilitator confirms the source transaction, the payout executes.
- Agent-native. The x402 protocol is already how agents pay for APIs on RelAI. Bridge transfers use the same client, the same wallet, the same flow.
Testnet First
Testnet support is live for Solana Devnet → SKALE Base Sepolia and the reverse direction.
This is intentional. Agents that are being developed or tested can exercise the full bridge flow — including real x402 payment construction, on-chain verification, and cross-chain payout — without spending real funds. Solana Devnet USDC is available through the standard Devnet airdrop and faucet flow. SKALE Base Sepolia tokens are available via the SKALE testnet faucet.
The testnet bridge uses separate keypairs from mainnet, a separate RPC endpoint (Solana Devnet at api.devnet.solana.com), and a separate USDC mint (4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU).
Developers building agents that need cross-chain liquidity management can build and test the entire flow before going to mainnet.
The Bigger Picture: Agents That Move Their Own Value
When we launched the Management API, the goal was to remove humans from the credential lifecycle. Agents should be able to bootstrap their own keys, create APIs, set pricing, and monitor revenue — without anyone opening a dashboard.
The bridge API extends that principle to capital management.
An agent that earns USDC on Solana through x402 API payments might need to pay out on SKALE Base. Or it might want to consolidate liquidity across chains. Or it might be operating a service where destination-chain funds are a dependency.
Previously, any of those workflows required a human to manually move funds. Now they do not.
The combination of Management API + agent bootstrap + bridge creates a substrate where agents can operate as genuine financial actors: earning, spending, and moving value across networks — autonomously, verifiably, without human intermediation at each step.
Explore the bridge documentation. Get a service key. Build on relai.fi.
