{"uid":"cap_xj6q52uP23R6LdmIydxte","slug":"glianaai-swap-build-tool-15fa0b5b","name":"GlianaAI Swap Build Tool","description":"GlianaAI - Pay-per-call AI models, live market data, SEC filings and identity APIs, no signup, USDC. This resource: tools/swap-build. Input: { chain, from, to, amount, address, to_chain?, to_address?, slippage_pct?, max_value_lost_pct? }. https://ai.glianalabs.com","url":"https://api.glianalabs.com/x402/tools/swap-build?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string","description":"Token to buy: a symbol or contract address."},"from":{"type":"string","description":"Token to sell: a symbol like USDC or ETH, or its contract address."},"chain":{"type":"string","description":"Chain to swap on: a name like base, ethereum, arbitrum, bsc, solana, or a chain id."},"amount":{"type":"string","description":"How much of the from token to sell, in whole tokens, e.g. \"10\" or \"0.25\"."},"address":{"type":"string","description":"The wallet that will sign and send the transaction (0x… on EVM, base58 on Solana)."},"to_chain":{"type":"string","description":"Optional destination chain for a bridge. Default: same as chain."},"to_address":{"type":"string","description":"Optional recipient on the destination chain. Default: address. Required when bridging between EVM and Solana."},"slippage_pct":{"type":"number","description":"Optional slippage tolerance in percent, 0.05 to 10. Default 0.5."},"max_value_lost_pct":{"type":"number","description":"Optional ceiling on value lost to fees and price impact, in percent. Default 3; above it the call is refused for free."}}},"responseSchema":{"type":"json","example":{"tool":"tools/swap-build"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fY4hOcWR4SbGMxHScCAnb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds a token swap transaction payload (quotes and structures a DEX swap) via GlianaAI's pay-per-call utility API","exampleAgentPrompt":"Build me a swap transaction to trade 100 USDC for ETH on a DEX — I need the full transaction payload I can sign and submit on-chain.","exampleUseCases":[{"title":"On-chain token exchange preparation","prompt":"I want to swap 500 USDC for SOL — can you build me the swap transaction data I need to sign and broadcast on-chain?"},{"title":"DeFi arbitrage route construction","prompt":"Build me a swap transaction to exchange 1 ETH for USDT using the best available DEX route, and give me the encoded calldata and estimated output amount."},{"title":"Automated treasury rebalancing swap","prompt":"I need to rebalance my wallet — build a swap transaction to convert 1000 DAI into WBTC so I can review and sign it before submitting."}],"resultDescription":"Returns a structured swap transaction payload (tool: tools/swap-build) including routing information, estimated output amounts, and encoded transaction data ready for signing and on-chain submission on supported blockchains.","failureModes":["Insufficient liquidity for the requested token pair returns an error or empty route","Unsupported token address returns a validation error","Malformed input body or missing required fields returns a 400-level error","Payment not received or insufficient USDC balance returns a 402 Payment Required","Network congestion may cause stale quotes or timeouts"],"whenToPreferThis":"Choose this endpoint when you need to programmatically build a DEX swap transaction payload without managing API keys or subscriptions — paying only $0.005 USDC per call via x402 on supported chains (Base, Solana, Algorand, BNB Chain, Tempo). Ideal for agents that need to construct swap calldata on-demand without a standing API contract.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T13:04:57.619Z","isFirstParty":false,"canonicalSlug":"glianaai-swap-build-tool-15fa0b5b"}