# Relaystation Route Calculator

> Relaystation Route Calculator is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Calculates a route between two geographic coordinates, returning distance, duration, and geometry as JSON

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/location/route
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-route-calculator-db1f0d74
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zSAJ0ztj29rmat1N-ixqP

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 relaystation-route-calculator-db1f0d74 -d '<json body>'
```

Example prompt: Can you calculate a driving route from coordinates 37.7749, -122.4194 to 37.3382, -121.8863 and tell me the distance and estimated travel time?

## When to prefer this

Choose this endpoint when you need a quick, low-cost ($0.01) route calculation between two coordinate pairs and want JSON back with distance, duration, and geometry. Ideal for agents handling logistics, delivery planning, map rendering, or travel time estimation where a lightweight routing call is sufficient and you want unified billing across Relaystation's tool suite.

## Known failure modes

- Invalid or out-of-range coordinates cause a 4xx error
- Unsupported travel mode enum value returns a validation error
- Origin and destination too close or identical may return degenerate route
- Network routing failure if coordinates are in an area with no road coverage
- Missing required fields (origin, destination) return a schema validation error
- Insufficient x402 balance results in payment failure before route calculation

## How this service works

$0.01/route. Calculate a route between two points — distance, duration, and geometry back as JSON. 155 tools, one balance — relaystation.ai

## Output

Returns a JSON object containing the calculated route between two coordinate pairs, including total distance, estimated travel duration, and route geometry (polyline or coordinates) suitable for map rendering or logistics planning.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "origin": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "maxItems": 2,
       "minItems": 2
      },
      "departNow": {
       "type": "boolean"
      },
      "travelMode": {
       "enum": [
        "Car",
        "Truck",
        "Pedestrian",
        "Scooter"
       ],
       "type": "string"
      },
      "destination": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "maxItems": 2,
       "minItems": 2
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "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/relaystation-route-calculator-db1f0d74/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
