# SafeRoute Swap Safety Check

> SafeRoute Swap Safety Check is a paid API for AI agents from saferoute-x402-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Pre-validates a Base DEX token swap for safety, returning verified contracts, indicative output amount, liquidity sources, fee estimate, warnings, and the exact next action — without executing the swap.

## Facts

- Endpoint: POST https://saferoute-x402-production.up.railway.app/v1/swap-safety-check
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saferoute-swap-safety-check-655106cb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EobESQpJAnVobLsXZwSon

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability saferoute-swap-safety-check-655106cb -d '<json body>'
```

Example prompt: Before I approve anything, run a safety check on swapping 200 USDC for WETH on Base — I want to see verified contracts, the indicative output, any warnings, and what fees to expect.

## When to prefer this

Choose this endpoint when an agent or user needs to pre-validate a Base DEX swap before committing a wallet signature — especially when safety, contract verification, and warning detection are priorities. It is ideal for agentic workflows where an automated system must confirm swap legitimacy before proceeding to execution. Prefer this over going directly to execution endpoints when the swap involves untrusted routes, unfamiliar tokens, or when a human-in-the-loop review step is required. Only covers the seven approved Base tokens (USDC, WETH, EURC, cbETH, cbBTC, VIRTUAL, AERO) and amounts up to $500 USDC equivalent.

## Known failure modes

- Unsupported token pair — if either from or to symbol is not in the approved enum list, the request is rejected
- Amount exceeds cap — sell amount above the $500 USDC equivalent limit returns an error
- Invalid amount format — non-numeric or incorrectly formatted amount string fails schema validation
- Insufficient liquidity — route may return a warning or no valid route if liquidity is too low
- Payment failure — x402 micropayment of $0.001 USDC not fulfilled results in a 402 response
- Missing required fields — omitting from, to, or amount returns a validation error

## How this service works

Check whether an approved Base token swap is eligible before supplying a wallet. Returns verified token contracts, indicative output, liquidity sources, fee estimate, warnings, and the exact next action. No custody, signing, or execution.

## Output

Returns verified token contract addresses for both sell and buy tokens, an indicative output amount for the trade, the liquidity sources that will be used, an estimated fee, any warnings or risk flags detected, and the precise next action the agent or user should take. No signing, custody, or execution occurs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "enum": [
    "USDC",
    "WETH",
    "EURC",
    "CBETH",
    "CBBTC",
    "VIRTUAL",
    "AERO"
   ],
   "type": "string",
   "description": "Approved Base buy-token symbol; must differ from from"
  },
  "from": {
   "enum": [
    "USDC",
    "WETH",
    "EURC",
    "CBETH",
    "CBBTC",
    "VIRTUAL",
    "AERO"
   ],
   "type": "string",
   "description": "Approved Base sell-token symbol"
  },
  "amount": {
   "type": "string",
   "pattern": "^\\d+(?:\\.\\d+)?$",
   "description": "Human-readable sell amount, capped at $500 USDC equivalent"
  },
  "intentId": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 128,
   "minLength": 16
  },
  "referralCode": {
   "type": "string",
   "pattern": "^[a-zA-Z0-9_-]+$",
   "maxLength": 64,
   "minLength": 3
  },
  "sourceAgentId": {
   "type": "string",
   "maxLength": 128,
   "minLength": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saferoute-swap-safety-check-655106cb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saferoute-x402-production.up.railway.app](https://www.zero.xyz/host/saferoute-x402-production.up.railway.app/llms.txt)
