Modemix API

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

Base URL

https://api.modemix.io

Authentication

All requests require an API key via 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 '{ ... }'

POST /route

Calculate optimal bike + transit routes between two points.

Request

{
  "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"
}
FieldTypeDefault
origin{ latitude, longitude }required
destination{ latitude, longitude }required
leave_afterunix timestampnow
arrive_byunix timestampnull
bike_speed_mpsfloat5.0
walk_speed_mpsfloat1.4
region_idstringbay_area

Response

{
  "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: bike, train, platform_access, walk. Every segment includes start, end, start_time, end_time, and duration_seconds.

Supported Regions

region_idCoverage
bay_areaSF Bay Area — BART, Caltrain, VTA
socalSouthern California — LA Metro, Metrolink
hawaiiHonolulu — Skyline
pacific_northwestSeattle / Portland — Sound Transit, TriMet
washington_baltimoreDC / Baltimore — WMATA, MTA

Rate Limiting

API keys may have a per-client request rate limit. If you exceed your limit, the API returns 429 Too Many Requests. Back off and retry after a short delay.

Errors

StatusMeaning
400Invalid request parameters
401Missing or invalid API key
429Rate limit exceeded
500Server error
503Cache loading — retry in 30-60s

No route found returns 200 with an empty routes array.

Get an API key

Fill this out and we'll get you set up.