# Route API: Valhalla-compatible /route

> /route takes Valhalla’s request body and returns Valhalla’s trip object, so a client written for Valhalla needs a new base URL. On Berlin the responses were byte-identical to Valhalla 3.9.1 on 100/100 auto, 30/30 pedestrian, 30/30 bicycle routes, on tiles geolith built.

Status: In development, not deployed: there is no routing endpoint to call yet, on geolith.app or api.geolith.app, and no routing plan, price or key.

## Route (/route) against Valhalla 3.9.1, Berlin

| Set | Requests | Byte-identical |
| --- | --- | --- |
| Auto | 100 | 100/100 |
| Pedestrian | 30 | 30/30 |
| Bicycle | 30 | 30/30 |

## Request

A POST to /route with a JSON body, as Valhalla documents it. ROUTER_HOST stands for a router you run; there is no hosted one.

- locations: two or more points with lat and lon; more than two make a multi-leg trip.
- costing: auto, pedestrian or bicycle.
- date_time: optional; with it, the router uses historical and live speeds (see Traffic and live data).
- units: kilometers (default) or miles.

Request shape (no hosted endpoint):

```bash
curl -X POST "https://ROUTER_HOST/route" \
  -H "Content-Type: application/json" \
  -d '{
    "locations": [
      { "lat": 52.5163, "lon": 13.3777 },
      { "lat": 52.5079, "lon": 13.3376 }
    ],
    "costing": "auto",
    "units": "kilometers"
  }'
```

## Response

A Valhalla trip object: length and time in total and per leg, the shape as an encoded polyline with precision 6, and maneuvers with English instructions. Spoken (verbal_*) instructions are in progress.

## Errors

Errors use Valhalla’s error body (error_code, error, status_code, status) with the HTTP status of the same number.

## Questions

### Is there an API key for routing?

No. Routing is not deployed, so there is no key, plan or price for it. A geolith API key today covers geocoding and vector tiles (India tile set today; planet tiles in development) only.

## Sources

1. [Routing API (planned)](https://docs.geolith.app/routing/api), geolith docs (read 2026-11-08)
2. [Valhalla turn-by-turn API reference](https://valhalla.github.io/valhalla/api/turn-by-turn/api-reference/), Valhalla (open source, MIT) (read 2026-11-08)

Routing is in development and not deployed; there is no endpoint to call yet, and no routing plan, price or key. Read the routing docs: https://docs.geolith.app/routing
