{"uid":"cap_oaiDtTCud74BPpt2EjYv7","slug":"red-web-utils-swap-route-411ff7eb","name":"red-web-utils Swap Route","description":"Pay-per-call web and onchain utilities for AI agents (MPP + x402, USDC on Base).","url":"https://red-web-utils.agent-tools-x402.workers.dev/api/swap/route?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["toToken","fromToken","fromAmount","fromAddress"],"properties":{"toChain":{"type":"string"},"toToken":{"type":"string"},"slippage":{"type":"string"},"fromChain":{"type":"string"},"fromToken":{"type":"string"},"fromAmount":{"type":"string"},"fromAddress":{"type":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gqgUDzIctAQ8I62Oq5Tfi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns an optimal cross-chain or same-chain token swap route given input/output tokens, amount, and sender address","exampleAgentPrompt":"Find me the best swap route to exchange 500 USDC for ETH starting from my wallet address 0xAbC...123 on Base — use a 0.5% slippage tolerance.","exampleUseCases":[{"title":"Cross-chain token bridge routing","prompt":"I want to move 1000 USDC from Base to Ethereum as ETH — what's the best swap route from my address 0xDe...456? Keep slippage under 1%."},{"title":"Same-chain DeFi swap quote","prompt":"Get me a swap route to exchange 2 WETH for USDC on Base from address 0xAb...789, with 0.5% slippage."},{"title":"Portfolio rebalancing route lookup","prompt":"I need to convert 300 DAI to WBTC on Base from wallet 0xFe...321 — find the optimal route and show me the expected output amount with 0.3% slippage."}],"resultDescription":"Returns the optimal swap route details including the routing path across liquidity sources, expected output token amount, price impact, gas estimates, and any intermediate hops needed to complete the exchange.","failureModes":["Unsupported token pair returns an error or empty route","Invalid fromAddress format causes a validation error","fromAmount of zero or negative triggers a bad request error","Insufficient liquidity for the requested pair returns no viable route","Unsupported chain identifier causes a lookup failure","Network timeouts when querying DEX aggregators"],"whenToPreferThis":"Use this endpoint when an AI agent needs to look up swap routing and pricing information for onchain token exchanges without executing a transaction — ideal for quoting, planning, or presenting trade options to users. It supports cross-chain routing, making it suitable for multi-chain DeFi workflows. Prefer this over on-chain direct calls when you need a simple, pay-per-call REST interface priced in USDC via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T06:33:04.809Z","isFirstParty":false,"canonicalSlug":"red-web-utils-swap-route-411ff7eb"}