Skip to content
Fourohtwo

api.cleave.fi/x402/gas

Native gas on Ethereum, Arbitrum, Base, BNB Chain, Polygon or Optimism, paid in USDC on Base, Arbitrum or Polygon. Orders: 0.8-50 USDC; gas on Ethereum 5-50. Send pay, chainId, recipient (ask your user), usdc (cross-chain: wallet or refundTo); the bare URL is a sample. A one-order address is written to swap USDC toward native gas, or to bridge and swap on arrival. It may yield native coin, USDC on

BaseAnswering
GEThttps://api.cleave.fi/x402/gas

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.cleave.fi/x402/gas?chainId=8453&pay=8453&recipient=0x0000000000000000000000000000000000000000&usdc=0.8");
console.log(await res.json());

Example input

{
  "chainId": "8453",
  "pay": "8453",
  "recipient": "0x0000000000000000000000000000000000000000",
  "usdc": "0.8"
}