Multimodal bike + transit routing.
The Modemix API computes directions that combine biking and public transit. Give it an origin and destination, and get the optimal step-by-step multimodal directions.
Get an API key ↓POST https://api.modemix.io/route
x-api-key: mmx_your_key_here
Content-Type: application/jsonBilled per request, pay as you go. Usage is summed monthly across all API keys linked to your account.
| Monthly volume | Per 1,000 |
|---|---|
| 0 – 100,000 | $5.00 |
| 100,001 – 500,000 | $4.00 |
| 500,001 – 1,000,000 | $3.00 |
| 1,000,001 – 5,000,000 | $1.50 |
| 5,000,001+ | $0.40 |
Tiered like tax brackets: each request is billed at the rate of the band it falls into. 200,000 requests in a month cost 100,000 × $5.00/1k + 100,000 × $4.00/1k = $900.00.
Every request needs an API key in the x-api-key header.
curl -X POST https://api.modemix.io/route \
-H "x-api-key: mmx_your_key_here" \
-H "Content-Type: application/json" \
-d '{ ... }'Calculate optimal bike + transit routes between two points.
{
"origin": { "latitude": 37.7749, "longitude": -122.4194 },
"destination": { "latitude": 37.8044, "longitude": -122.2712 },
"leave_after": 1700000000,
"arrive_by": null,
"bike_speed_mps": 5.0,
"walk_speed_mps": 1.4,
"region_id": "bay_area"
}| Field | Type | Default |
|---|---|---|
| origin | { latitude, longitude } | required |
| destination | { latitude, longitude } | required |
| leave_after | unix timestamp | now |
| arrive_by | unix timestamp | null |
| bike_speed_mps | float | 5.0 |
| walk_speed_mps | float | 1.4 |
| region_id | string | bay_area |
{
"routes": [
[
{ "mode": "bike", "duration_seconds": 180, "distance_meters": 900, ... },
{ "mode": "platform_access", "duration_seconds": 120, ... },
{ "mode": "train", "route_id": "...", "train_info": { ... }, ... },
{ "mode": "platform_access", "duration_seconds": 60, ... },
{ "mode": "bike", "duration_seconds": 240, "distance_meters": 1200, ... }
]
],
"total_routes": 3,
"shortest_route_index": 0
}Each route is an array of segments. Segment modes are bike, train, platform_access, and walk. Every segment includes start, end, start_time, end_time, and duration_seconds.
API keys may have a per-client request rate limit. Past it, the API returns 429 Too Many Requests. Back off and retry after a short delay.
| 400 | Invalid request parameters |
| 401 | Missing or invalid API key |
| 429 | Rate limit exceeded |
| 500 | Server error |
| 503 | Cache loading — retry in 30-60s |
No route found returns 200 with an empty routes array.
Fill this out and we'll get you set up.