Swap Build

An UNSIGNED swap or bridge transaction for the caller's own wallet (address) to sign and send.

$0.0050 per call POST /v1/tools/swap-build

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-build \
  -H 'content-type: application/json' \
  -d '{"chain":"base","from":"USDC","to":"ETH","amount":"10","address":"0x7662E00f8Ab4C362166e1FF649Ff6c2A638c80AD"}'

When to use it

Non-custodial: GlianaAI never holds keys or funds, and nothing happens until the caller signs. Use when an agent has decided to trade and needs a ready transaction. Returns the EVM transaction (to, data, value, gasLimit) or a base64 Solana transaction, an ERC-20 approval transaction when one may be needed, receive and receive_min, value_lost_pct and fees. The per-call price buys the transaction; a GlianaAI service fee, shown as service_fee_pct, already deducted from receive and counted in value_lost_pct, is taken on-chain only when it is signed and sent. Refuses for free when value lost exceeds max_value_lost_pct (default 3) or no route exists. Check the amounts before signing.

What it costs

$0.0050 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.