# Flow Fill Instruction API

> Flow Fill Instruction API is a paid API for AI agents from flow-kg4x.vercel.app, paid per call via x402, $0.08117/call, status unknown (last checked 2026-10-18).

Returns an executable swap route package for Base that beats the Uniswap V3 baseline, priced at 25% of the measured improvement (capped at 10 bps of output).

## Facts

- Endpoint: POST https://flow-kg4x.vercel.app/api/fill?utm_source=zero.xyz
- Price: $0.08117/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/flow-fill-instruction-api-7927afae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KcKg-rVhJhc-TmGtkIKxg

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-fill-instruction-api-7927afae -d '<json body>'
```

Example prompt: Before I commit to swapping 500 USDC for WETH on Base, get me the best executable fill instruction — I want the venue, router, calldata, minimum output, and expiry block for the route that beats the Uniswap V3 price right now.

## When to prefer this

Use this endpoint when an agent is about to execute a token swap on Base and wants the best executable price beyond what Uniswap V3 offers, with a ready-to-submit calldata package. Prefer this over a generic quote endpoint when you need both the price improvement validation and the executable route in one call. Best suited for smart wallet agents that need actionable fill instructions rather than just indicative quotes.

## Known failure modes

- No improvement over Uniswap V3 baseline — returns $0 cost response with no fill instruction
- Expired expiry block — route may be stale by the time of submission
- Insufficient liquidity for the requested swap size — no valid route returned
- Invalid token pair or unsupported token on Base — request fails
- Payment failure via x402 protocol — call not processed

## How this service works

Flow fill instruction on Base: the executable route package (venue, router, calldata params, min output, expiry block) for a swap whose best quote beats the Uniswap V3 baseline. Priced dynamically at 25% of the measured improvement, capped at 10 bps of output; $0 when there is no improvement.

## Output

Returns a complete executable swap route package including the venue (DEX), router address, calldata parameters, minimum output amount, and expiry block number. The package is ready to submit on-chain. Only returned when the route beats the Uniswap V3 baseline; the fee is 25% of the measured improvement, capped at 10 bps of output, and $0 when there is no improvement.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/flow-fill-instruction-api-7927afae/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)
