# x402 Trust Layer Rail Optimizer Route

> x402 Trust Layer Rail Optimizer Route is a paid API for AI agents from x402trustlayer.xyz, paid per call via x402, $0.04/call, status unknown (last checked 2026-10-22).

Optimizes and routes HTTP rail requests through x402 trust infrastructure, returning an allowed/denied decision with a summary after payment settlement.

## Facts

- Endpoint: POST https://x402trustlayer.xyz/api/rail-optimizer/route?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-trust-layer-rail-optimizer-route-782c6f66
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A79B1pD7jq1XWtKmH0-FC

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 x402-trust-layer-rail-optimizer-route-782c6f66 -d '<json body>'
```

Example prompt: Run an x402 rail optimizer check on an HTTP GET request — I need to know if it's allowed and get a summary back after trust layer settlement.

## When to prefer this

Choose this endpoint when you need to route or authorize an HTTP GET, HEAD, or DELETE request through the x402 trust infrastructure specifically, especially when rail optimization and post-settlement compliance validation are required. Prefer this over generic access-control or mandate-verification endpoints when the goal is route-level optimization with a paid trust decision.

## Known failure modes

- Payment not settled — x402 micropayment of $0.04 USDC not completed, request blocked
- Invalid HTTP method supplied — only GET, HEAD, DELETE are accepted (POST/PUT/PATCH will fail schema validation)
- Missing required 'type' field set to 'http' — request rejected
- Input type not 'http' — const mismatch causes rejection
- Network or trust layer unavailability — service returns error or no response
- Malformed input object — additionalProperties present on input object causes schema rejection

## How this service works

68 paid x402 trust infrastructure APIs: guard, semantic escrow, mandate diff, certified seller network, KYM, mandates, compliance, disputes, and orchestration.

## Output

A JSON object containing: 'ok' (boolean indicating call success), 'allowed' (boolean indicating whether the request is permitted through the rail), and 'summary' (human-readable explanation of the routing/settlement outcome) — returned after x402 payment is settled.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "allowed",
      "summary"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "allowed": {
       "type": "boolean"
      },
      "summary": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "allowed": true,
  "summary": "Paid response after x402 settlement"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-trust-layer-rail-optimizer-route-782c6f66/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402trustlayer.xyz](https://www.zero.xyz/host/x402trustlayer.xyz/llms.txt)
