For developers and AI agents
Build on ZeroFee
ZeroFee Swap and ZeroFee Pay inside your own code or your AI agent, across 70+ chains, straight on the protocols. A keyless REST API, an MCP server and plain deep links, all by one-time deposit address: the API never creates or holds a wallet or a key, and ZeroFee adds 0%. Every protocol and network cost is in the price before anything is sent.
- No API key
- 70+ chains
- Non-custodial
- CORS open to browsers
REST API
MCP for AI agents
Deep links
Quickstart: quote, then swap
No sign-up and no key. Ask for a quote, reserve a one-time deposit address on the route you like, and the user pays it from any wallet or exchange.
Creating the swap moves nothing: funds only move when the user sends them. Quotes expire in about 25 seconds, so re-quote if you wait. The full walk-through is in the recipes.
# 1. Price 0.5 SOL to ETH on Base. Routes come back best first.
curl -s -X POST https://zerofee.si/api/v1/quote \
-H 'content-type: application/json' -d '{
"from": { "chain": "sol", "token": "native" },
"to": { "chain": "base", "token": "native" },
"amount": "0.5",
"refundTo": "<your Solana address>",
"recipient": "<your Base address>"
}'
# 2. Reserve a one-time deposit address on that route (routes[].provider).
curl -s -X POST https://zerofee.si/api/v1/swap \
-H 'content-type: application/json' -d '{
"from": { "chain": "sol", "token": "native" },
"to": { "chain": "base", "token": "native" },
"amount": "0.5",
"refundTo": "<your Solana address>",
"recipient": "<your Base address>",
"provider": "near", "mode": "deposit"
}'
# 3. Pay depositAddress the exact amount from any wallet, then poll:
curl -s "https://zerofee.si/api/v1/status?provider=near&id=<trackingId>"Payments
Accept payments, receive exactly the amount
A checkout is the same two calls with amountOut instead of amount: the merchant gets exactly that much of the coin they chose, and the quote tells the payer what to send. Give exactly one of amount, amountRaw or amountOut, and pass the quoted input as maxAmountIn when you create the payment.
Two more calls cover the rest: POST /api/v1/paylink makes a shareable pay link for an exact amount (nothing reserved or stored), and POST /api/v1/x402/fund prices getting exactly what an HTTP 402 asks for into your own wallet from a coin you hold, so your x402 client can pay it. See the API reference.
Payments run on exact-output routes (Relay or NEAR Intents, whichever asks the payer for less). The xmr option pays through Monero and delivers at least the amount. No code at all? Make a pay link and put it behind a button. Details and limits: Pay links & payments.
# 1. How much ETH on Base pays EXACTLY 25 USDC on Solana? (routes[0].amountIn)
curl -s -X POST https://zerofee.si/api/v1/quote \
-H 'content-type: application/json' -d '{
"from": { "chain": "base", "token": "native" },
"to": { "chain": "sol", "token": "USDC" },
"amountOut": "25",
"refundTo": "<payer's Base address>",
"recipient": "<merchant's Solana address>"
}'
# 2. Create the payment, capped at what the payer agreed to send.
# If the fresh price needs more: 409 price_moved, nothing reserved.
curl -s -X POST https://zerofee.si/api/v1/swap \
-H 'content-type: application/json' -d '{
"from": { "chain": "base", "token": "native" },
"to": { "chain": "sol", "token": "USDC" },
"amountOut": "25", "maxAmountIn": "<routes[0].maxAmountIn>",
"refundTo": "<payer's Base address>",
"recipient": "<merchant's Solana address>",
"provider": "<routes[0].provider: relay or near>", "mode": "deposit"
}'What you can build
70+ chains
70+ chains, including Bitcoin, Solana, the EVM chains and more. Paste a contract address or mint to find a token; launchpad coins such as pump.fun and bonk.fun route once NEAR Intents or Relay can carry them. A route is not always available, so check the quote's errors before telling a user there is none.
Deposit swaps from any wallet
The protocol issues a one-time deposit address and the user pays it from any wallet or exchange. Neither you nor the API ever handles a key, and a failed swap is refunded to the address you gave.
Payments and agent funding
Exact-output payments, shareable pay links and x402 funding into an agent's own wallet, all by deposit. The same two calls cover a checkout, and the agent signs its own x402 payment.
Privacy options, clearly labelled
Ask for standard, private (confidential crossing on NEAR Intents) or XMR routes with one field. XMR is the Monero step: coin to Monero to coin, where Monero hides the sender, the receiver and the amount (ring signatures and stealth addresses), and each part pays the next one's deposit address (a NEAR Intents or Relay conversion is added before or after when a coin isn't listed). The swap page's Solana ZK pool and Zcash shielded steps run wallets made in the browser, so they live in the app. How each one works is spelled out in Privacy protocols.
What to expect
- No wallets, no keys. The API never creates, holds or touches a wallet or a key, and never signs or sends anything. Third parties do hold funds while a swap is in flight: the protocol that issued the deposit address while it fills and, if you request the XMR option, the Monero step for a few minutes (the API reference lists the services).
- 0% from ZeroFee. Protocols, solvers and networks charge their own, itemised on every route.
- No API key, per-IP rate limits. Reads 120 a minute, quotes 60, swap creation 30, MCP 120. Successful responses carry
X-RateLimit-*headers. - Live status. Live checks are on the status page, refreshed every minute and public at /api/v1/health.
- Security, in the open. How the app is built, what it checks and what it depends on are on Security.
- Stateless and log-free. Requests and addresses are not stored or logged by the API.