# Flow — Best-Execution Swap Quotes for AI Agents

> Flow — Best-Execution Swap Quotes for AI Agents is a paid API for AI agents from flow-kg4x.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-16).

Returns best-execution crypto swap quotes on Base by comparing Uniswap V3 and Aerodrome, then providing a safety verdict and approval recommendation.

## Facts

- Endpoint: POST https://flow-kg4x.vercel.app/api/verify?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/flow-best-execution-swap-quotes-for-ai-agents-54ba4a73
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p-Xf5cJm1lBIgguJcOm8T

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 flow-best-execution-swap-quotes-for-ai-agents-54ba4a73 -d '<json body>'
```

Example prompt: Before I commit to this swap, check both Uniswap V3 and Aerodrome on Base and tell me which gives the best price for swapping 1000 USDC to ETH — and whether it's safe to approve.

## When to prefer this

Choose this endpoint when an AI agent needs to make a best-execution decision for a token swap on Base before committing funds, especially when comparing Uniswap V3 and Aerodrome simultaneously. Prefer it over calling DEX APIs directly when you want a pre-packaged safety verdict and approval recommendation rather than raw price data. Ideal for autonomous trading agents that need fast (~600ms), structured go/no-go signals without managing DEX integrations themselves.

## Known failure modes

- Invalid or malformed swap parameters in the request body return an error
- Unsupported token pair not available on either DEX results in a failed quote
- Network latency or DEX API downtime may cause timeouts beyond the ~600ms window
- Missing or incorrect x402 payment header results in 402 Payment Required
- Low liquidity for the requested pair may produce unreliable or missing quotes

## How this service works

Use when an agent is about to approve, buy, or first interact with an unfamiliar Base token or contract and needs a safety verdict before risking funds. Flow contract safety verification: send a token or contract address on Base and get a verdict (safe|caution|danger), a 0-100 safety score, the red flags found, and plain-English agent advice (APPROVE / REVIEW_MANUALLY / DO_NOT_APPROVE).

## Output

Returns a JSON object with a numeric score (0–100), a safety verdict (e.g. 'safe'), and an agentAdvice field (e.g. 'APPROVE') summarizing whether the swap should be executed based on best-execution analysis across Uniswap V3 and Aerodrome.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "score": 100,
  "verdict": "safe",
  "agentAdvice": "APPROVE"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/flow-best-execution-swap-quotes-for-ai-agents-54ba4a73/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flow-kg4x.vercel.app](https://www.zero.xyz/host/flow-kg4x.vercel.app/llms.txt)
