Swap Quote
The best routes to swap one token for another, or bridge between chains, across 60+ mainnets including Base, Ethereum, Arbitrum, BSC and Solana, routed through DEX agg…
Call it
The first response is 402 with the exact price and every rail you can
pay with. Pay, repeat the request with the proof, and you get the result.
curl -X POST https://api.glianalabs.com/v1/tools/swap-quote \
-H 'content-type: application/json' \
-d '{"chain":"base","from":"USDC","to":"ETH","amount":"10"}'When to use it
The best routes to swap one token for another, or bridge between chains, across 60+ mainnets including Base, Ethereum, Arbitrum, BSC and Solana, routed through DEX aggregators and bridges. Use before an agent trades, to see what it would receive and what it would lose. from/to are symbols (USDC, ETH, SOL) or contract addresses; amount is in whole tokens ("10", "0.25"), not base units; to_chain bridges. Returns routes[] with receive, receive_min (after slippage), value_lost_pct (fees and price impact together), gas_usd, every fee, the DEXs and bridges used and an estimated duration. The per-call price buys the quote; a GlianaAI service fee, shown as service_fee_pct and already deducted from receive, is taken on-chain only if the swap is executed. A quote only — no wallet needed and nothing is executed; call swap-build for a transaction.
What it costs
$0.0020 per successful call — flat, with no plan, minimum or monthly fee. A call that fails validation is refused before it runs, so it is never charged.
Not sure this is the right endpoint? GET /v1/consult?intent=… is
free and answers that.
Often used with this
Swap Build
$0.0050An UNSIGNED swap or bridge transaction for the caller's own wallet (address) to sign and send.
Gas Price
$0.0100Current gas on an EVM chain, priced in both gwei and dollars.
Token Price
$0.0020Spot prices for cryptocurrencies and tokens. Use when an agent values a holding, converts an amount, or checks a market before acting.