PreviewThis is a preview. The API is not open yet, the addresses in these examples do not serve traffic, and nothing here is a commitment.

WayMatrix
Sign in (not available yet)Get an API key (not available yet)

For agents

Hand this to your coding agent

Most integrations now happen with an agent in the loop. Rather than making yours read a tutorial, paste the block below into it. Everything in it is generated from the same API description the service runs on, so it cannot describe a call we do not serve.

The block is plain text on purpose. It carries no markup, no framework assumptions and no code in any particular language, because the thing pasting it already knows which language you are working in and will write better code for your project than a snippet written for nobody in particular.

The block

paste this into your agent
WayMatrix — integration brief for a coding agent.
Everything below is generated from the API's own description. Follow it exactly;
do not infer endpoints, parameters or behaviour that is not listed here.

BASE URL
--------

  https://api.waymatrix.io

AUTHENTICATION
--------------

  Send the API key raw in the "Authorization" header.
  There is NO "Bearer " prefix. This is deliberate — it matches the
  openrouteservice client libraries, so their code works unchanged.
  A "Bearer " prefix is tolerated if you already send one.
  On GET requests you may pass ?api_key=<key> instead.

ENDPOINTS — this is all of them
-------------------------------

  POST  /v2/matrix/driving-car             Travel-time and distance matrix
  POST  /v2/matrix/driving-car/json        Travel-time and distance matrix (explicit JSON form)
  GET   /v2/directions/driving-car         Route between two points
  POST  /v2/directions/driving-car         Route with full options
  POST  /v2/directions/driving-car/json    Route, JSON form
  POST  /v2/directions/driving-car/geojson Route, GeoJSON form
  POST  /v2/directions/driving-car/gpx     Route, GPX form
  POST  /v2/isochrones/driving-car         Reachability polygons
  POST  /v2/isochrones/driving-car/geojson Reachability polygons (explicit GeoJSON form)
  GET   /v2/health                         Liveness
  HEAD  /v2/health                         Liveness, headers only
  GET   /v2/status                         Engine and graph provenance
  HEAD  /v2/status                         Engine and graph provenance, headers only

  CAUTION, python + gpx: The Python client calls response.json() unconditionally in every released version, so a GPX body raises "HTTP Error: 200". The fix exists upstream but has never been released. It fails the same way against the API we are compatible with, so it is not a difference between us — but a reader would reasonably conclude it was our fault. Show GPX with curl or plain HTTP instead.

WHAT THIS API DOES NOT HAVE — do not attempt these
--------------------------------------------------

  - No geocoding and no place search. Send longitude and latitude.
  - No live traffic. Durations come from the road network, not from current conditions.
  - Nothing outside North America, and no profile except driving.
  - No route optimization. Sequencing stops is a different problem and we do not solve it.

LIMITS
------

  The largest request THE SERVICE accepts is 90,000 elements
  (a 300 x 300 square matrix). YOUR tier's cap may be lower, and the
  per-tier figure below is the one that applies to your key. Split larger
  jobs into several requests; chunking costs exactly the same.
  Beta           60 requests/min, no monthly ceiling, 90,000 per request (300 x 300)
  Free           5 requests/min, 250,000 elements/month, 2,500 per request (50 x 50)
  Starter        120 requests/min, 5,000,000 elements/month, 90,000 per request (300 x 300)
  Growth         300 requests/min, 25,000,000 elements/month, 90,000 per request (300 x 300)
  Scale          600 requests/min, 100,000,000 elements/month, 90,000 per request (300 x 300)

BILLING
-------

  The billed unit is the element: one origin paired with one destination.
  A 200 x 150 matrix costs 30,000 of them whether sent as one request or thirty.
  These stop at the allowance rather than billing: Beta, Free, Starter.
  Requests that fail are not charged.

ERRORS — write retry logic against these, not against assumptions
-----------------------------------------------------------------

  401  No key at all
       {"error":"Authorization field missing","code":5001}
  403  Key present but rejected
       {"error":"Access to this API has been disallowed","code":5002}
  429  Rate limited
       {"error":"Rate Limit Exceeded","code":5003}
  403  Monthly quota exhausted
       {"error":"Quota exceeded","code":5004}
  400  Request larger than your tier allows
       {"error":{"code":6004,"message":"…Only a total of N routes are allowed."}}
  502  Routing engine unreachable
       {"error":"The routing engine is unavailable","code":5008}
  404  A path we do not serve
       {"error":"Not found","code":5010}

  IMPORTANT: this API never returns 503. An unreachable engine is 502.

  BRANCH RETRIES ON THE STATUS, NOT ON THE CODE.
  429 is always worth retrying with exponential backoff and jitter. It is
  either a per-minute rate limit or a concurrency refusal, and both clear
  on their own. Do not inspect the code to decide — that is how you miss
  one of them.
  403 is terminal. Never retry it. A monthly allowance is deliberately a
  403 rather than a 429, because it does not clear until the month does;
  a client that backed off and retried would hammer a wall for weeks.

  Read the code to decide WHAT TO SAY, never whether to retry. More than
  one rejection shares a status in both directions, and new codes may be
  added within the range. Code that branches on the status keeps working
  when they are; code that branches on the code does not.
  (Read off the running service on 2026-09-04.)

EXAMPLE REQUEST
---------------

  curl -X POST \
    https://api.waymatrix.io/v2/matrix/driving-car \
    -H "Authorization: $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "locations": [
        [-87.6298, 41.8781],
        [-87.6244, 41.8796],
        [-87.6722, 41.9227]
      ],
      "metrics": ["duration", "distance"],
      "units": "km"
    }'

ATTRIBUTION — a licence condition on the application you build
--------------------------------------------------------------

  The map data is licensed under the Open Database License.
  If your application shows these results to people, it must credit
  "© OpenStreetMap contributors",
  linking https://www.openstreetmap.org/copyright.
  This is a legal requirement, not a preference. Include it.

Three things to add when you paste it

The block describes the API, not your product

  • Tell it what you are building. The block describes the API. It does not know whether you want a commute filter or a dispatch board, and an agent given only the reference will invent a shape for your data.
  • Give it a real coordinate pair from your own data. The example uses Chicago. An agent that has seen one of your actual locations will write something closer to what you need, and will catch a coverage problem immediately rather than at integration time.
  • Ask it to handle the errors, not just the happy path. The block lists every rejection with its status and body. Say "handle these" explicitly, because an agent optimising for a working demo will skip them.

Why this is generated rather than written

An agent follows an instruction confidently and does not check it, which makes a wrong example far more expensive here than in a tutorial a person skims. So none of this is hand-typed. The endpoints, the profile, the limits and the example request all come out of the API description and the tier contract, and the error shapes were read off the running service on the date shown below.

Not using an agent?

Then you need one line changed and nothing else. The migration guide has the diff, and the same block below works perfectly well as a reference you read yourself.

Read the migration guide Get a free API key (not available yet)