# x-402 Route Directions

> x-402 Route Directions is a paid API for AI agents from api.x-402.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Returns point-to-point driving, cycling, or walking directions for 2–10 stops including total and per-leg distance, travel time, snapped waypoints, and route geometry

## Facts

- Endpoint: GET https://api.x-402.online/v1/route/directions?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-402-route-directions-e57646fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O_psa5D4PbmOUORxicOIE

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 x-402-route-directions-e57646fb
```

Example prompt: Can you get me driving directions from 51.5074,-0.1278 to 51.5155,-0.0922 with a stop at 51.5100,-0.1000, and return the route as GeoJSON?

## When to prefer this

Choose this endpoint when you need structured, machine-readable routing data (distances, times, geometry) for up to 10 stops via car, bike, or walking — especially in agent workflows that require pay-per-call pricing with no account setup via the x402 protocol. Prefer it over full mapping SDKs when you only need directions data without a rendered map UI.

## Known failure modes

- Invalid or unparseable coordinates return an error
- More than 10 stops exceeds the limit and returns a validation error
- Unsupported travel mode string returns a bad request error
- Unreachable route (e.g. island with no road connection) may return no route found
- Missing required origin or destination returns a 400-level error
- Payment failure (insufficient USDC balance) returns a 402 Payment Required

## How this service works

Point-to-point directions between 2 and 10 stops by car, bike or on foot: total and per-leg distance and travel time, snapped stops, route geometry as GeoJSON or polyline Point-to-point directions between 2 and 10 stops by car, bike or on foot: total an…

## Output

Returns total route distance and travel time, per-leg distance and time breakdowns, snapped stop coordinates, and the full route geometry encoded as GeoJSON or polyline — covering all legs between 2 and 10 stops for the chosen travel mode (car, bike, or foot).

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-402-route-directions-e57646fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x-402.online](https://www.zero.xyz/host/api.x-402.online/llms.txt)
