# SafeRoute Swap Safety Check

> SafeRoute Swap Safety Check is a paid API for AI agents from api.usesaferoute.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Pre-flight eligibility check for a Base DEX token swap — returns verified contracts, indicative output, liquidity sources, fee estimate, warnings, and the next required action without executing or signing anything.

## Facts

- Endpoint: POST https://api.usesaferoute.com/v1/swap-safety-check
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saferoute-swap-safety-check-74ed765a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i9zn2TiXtrralbXDRMGPU

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-74ed765a -d '<json body>'
```

Example prompt: Before I swap 200 USDC for WETH on Base, run a SafeRoute safety check — I want to see the verified contracts, expected output, any warnings, and what the fees will be before I commit to anything.

## When to prefer this

Choose this endpoint when an AI agent needs to validate and risk-check a Base DEX swap before committing a wallet signature — particularly when operating with user funds and requiring verified contract addresses, fee transparency, and explicit warnings. It is a read-only pre-flight check ideal for agentic workflows that enforce a human-in-the-loop approval gate or automated risk threshold before execution. Prefer this over executing a swap directly when trust, safety, and auditability matter, and when the swap involves any of the seven approved Base tokens (USDC, WETH, EURC, cbETH, cbBTC, VIRTUAL, AERO).

## Known failure modes

- Invalid or non-whitelisted token symbol returns validation error
- Sell amount exceeding $500 USDC equivalent cap rejected
- from and to tokens are the same symbol — rejected by enum constraint
- intentId not meeting length or character pattern requirements
- Amount string not matching numeric pattern returns schema error
- Service unavailable or liquidity data temporarily inaccessible

## 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

A structured response containing: verified smart contract addresses for both tokens, an indicative output amount the user would receive, identified liquidity sources routing the swap, an estimated fee breakdown, any risk warnings (e.g. low liquidity, suspicious contracts), and the exact next action the caller should take — all without any signing, custody, or trade execution.

## 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-74ed765a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.usesaferoute.com](https://www.zero.xyz/host/api.usesaferoute.com/llms.txt)
