# HALOWERK x402werk Route Optimizer

> HALOWERK x402werk Route Optimizer is a paid API for AI agents from x402.netzhandwerker.de, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Given a buyer's token balances and a seller's accepted payment methods, returns an optimal payment route ranked by cost, speed, or security.

## Facts

- Endpoint: POST https://x402.netzhandwerker.de/route/optimize
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-x402werk-route-optimizer-6c9a2a43
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BGC4UsDXwBZ3PWkQL2x-W

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 halowerk-x402werk-route-optimizer-6c9a2a43 -d '<json body>'
```

Example prompt: I need to pay a seller $5.00 — I hold 20 USDC on Base (eip155:8453) and 0.01 ETH on Ethereum (eip155:1), and the seller accepts USDC on Base. Give me the cheapest payment route.

## When to prefer this

Use this endpoint when an AI agent needs to decide which of the user's held tokens and chains to use for a specific payment to a seller with defined accepted assets — particularly in multi-chain wallet scenarios where cost, speed, or security trade-offs matter. Prefer this over manual routing logic when the seller's accepted list and buyer's balances are known and you need a ranked recommendation rather than a single hardcoded path.

## Known failure modes

- No overlapping asset/chain between buyer balances and seller accepted list — returns empty or error
- Buyer balance too low to cover amount_usd — may return no viable routes
- Invalid CAIP-2 chain identifier format — validation error
- amount_usd below minimum threshold of 0.000001 — schema validation failure
- Empty available or accepted_by_seller arrays — schema validation failure

## How this service works

HALOWERK x402werk — bezahlte Endpunkte nach x402. Preise in USDC auf Base Mainnet.

## Output

Returns three ranked payment routes (by guenstig/cheapest, schnell/fastest, and sicher/most secure), each specifying which chain and asset combination to use, based on the caller's available balances and the seller's accepted payment methods. All three rankings are always returned regardless of the requested priority.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "priority": {
   "enum": [
    "guenstig",
    "schnell",
    "sicher"
   ],
   "type": "string",
   "default": "guenstig",
   "description": "Which ranking to put first. All three are always returned."
  },
  "available": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "chain",
     "asset",
     "balance"
    ],
    "properties": {
     "asset": {
      "type": "string",
      "description": "Asset address or symbol."
     },
     "chain": {
      "type": "string",
      "description": "CAIP-2 chain, for example eip155:8453."
     },
     "balance": {
      "type": "number",
      "minimum": 0,
      "description": "Balance in USD equivalent."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 30,
   "minItems": 1,
   "description": "What the caller holds."
  },
  "amount_usd": {
   "type": "number",
   "minimum": 0.000001,
   "description": "Amount to be paid, in USD."
  },
  "accepted_by_seller": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "chain",
     "asset"
    ],
    "properties": {
     "asset": {
      "type": "string"
     },
     "chain": {
      "type": "string"
     },
     "scheme": {
      "type": "string",
      "description": "Payment scheme, usually exact."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 30,
   "minItems": 1,
   "description": "What the seller accepts."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-x402werk-route-optimizer-6c9a2a43/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.netzhandwerker.de](https://www.zero.xyz/host/x402.netzhandwerker.de/llms.txt)
