# intent402 Token Swap Intent Resolver

> intent402 Token Swap Intent Resolver is a paid API for AI agents from intent402.dylan-caponi.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Converts a natural-language swap intent into an unsigned, ready-to-sign blockchain transaction on Base (chainId 8453).

## Facts

- Endpoint: POST https://intent402.dylan-caponi.workers.dev/intent/swap
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/intent402-token-swap-intent-resolver-82eb97d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8AHhJJbeDe6b2e5yoTL3i

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 intent402-token-swap-intent-resolver-82eb97d0 -d '<json body>'
```

Example prompt: I want to swap 50 USDC for ETH on Base — can you give me the unsigned transaction I need to sign to make that happen?

## When to prefer this

Choose this endpoint when you need to translate a human-readable token swap intent into a complete unsigned transaction on Base (chainId 8453) without manually constructing ABI calldata, computing gas, or querying DEX routers. It is ideal for AI agents that receive natural language swap requests and need to produce signable transactions quickly, especially within x402 micropayment-enabled workflows. Prefer alternatives if you need multi-chain support beyond Base, require a signed/broadcast transaction, or need order-book trading rather than AMM-style swaps.

## Known failure modes

- Unsupported token pair returns an error or empty transaction
- Insufficient liquidity for the requested swap amount
- Malformed intent description that cannot be parsed into a valid swap
- Invalid or unsupported chain ID
- Payment failure (402) if USDC payment of $0.02 is not included
- Rate limiting or worker timeout on high-load requests

## How this service works

Transaction intent resolution for AI agents: describe what you want, get back unsigned ready-to-sign transactions.

## Output

A JSON object containing the resolved swap transaction: the contract address to call (to), hex-encoded calldata (data), gas limit estimate, value in wei, the chain ID (8453 for Base), and the expected output token amount — everything needed to sign and broadcast the transaction without any additional construction.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "example": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "intent": "swap",
  "transaction": {
   "to": "0x...",
   "gas": 200000,
   "data": "0x...",
   "value": "0",
   "chainId": 8453
  },
  "expectedOutput": "0.048 ETH"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/intent402-token-swap-intent-resolver-82eb97d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intent402.dylan-caponi.workers.dev](https://www.zero.xyz/host/intent402.dylan-caponi.workers.dev/llms.txt)
