Routing API · MCP server · Agent skill

The geospatial stack you don't have to build

Send stops from your code or your AI agent. Get back a dispatch-ready route in seconds, with geocoding in the same API.

MCPhttps://r4m.ai/api/mcp

Works in Claude, ChatGPT, Cursor and VS Code. Setup per client →

EAST RIVERMANHATTANWILLIAMSBURGDOWNTOWND2345
You → your agent

plan the fastest route through these stops, leaving at 8

● r4m · create_optimization
Plan · leaving 08:00
  1. DDepot, 25 Kent Ave08:00
  2. 21155 Manhattan Ave09:00 · 0.9 mi
  3. 31 Front St09:18 · 5.6 mi
  4. 4445 Albee Square W09:34 · 8.5 mi
  5. 5238 Bedford Ave10:01 · 11.4 mi
  6. DBack at depot10:18 · 12.1 mi
12.1 mi · 2 h 18 min · every stop fits
1B+destinations optimized
17+ yearsof Route4Me routing algorithms
No serversto run, queue or scale
$0.005per stop, $1 free to start

Get started

Start from your agent or from your code

Everything works the same two ways: an MCP server for your agents and a REST API for your code.

  1. Connect the MCP server

    MCPhttps://r4m.ai/api/mcp

    Claude, ChatGPT, Cursor and VS Code. Setup per client →

  2. Add the Agent Skill

    npx skills add r4m-ai/skills

    Your agent learns when to plan a route itself and how to wire the SDK, keys and webhooks into your code. View on GitHub →

  3. Ask in plain words

    plan the fastest route through these stops, leaving at 8
~/today · your agent
> plan the fastest route through these stops,
  leaving at 8

● r4m · create_optimization    5 addresses

  Depot 08:00 → 1155 Manhattan Ave → 1 Front St
  → 445 Albee Square W → 238 Bedford Ave → Depot 10:18

12.1 mi · 2 h 18 min · every stop fits

How it works

One request, a dispatch-ready plan

Send your stops, get back the order to drive them in. The SDKs wait out the solve for you. Over plain HTTP, poll for the result or have it pushed to your webhook.

  1. 01 · ASK

    Send your stops

    POST /api/v1/optimizations

    From code, the SDK or your AI agent. One request is all it takes.

  2. 02 · WE SOLVE

    We run the engines

    202 Accepted · 2–60 s

    Optimization runs asynchronously on our side. Nothing for you to operate.

  3. 03 · USE IT

    Get the plan

    webhook or GET /{id}

    Pushed to your webhook, or fetched by id once the status is completed.

You send

curl -X POST https://r4m.ai/api/v1/optimizations \ -H "Authorization: Bearer acc_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "addresses": [ { "address": "Depot — 25 Kent Ave, Brooklyn, NY", "lat": 40.7218, "lng": -73.9615, "isDepot": true, "serviceTimeSeconds": 900 }, { "address": "1155 Manhattan Ave, Brooklyn, NY", "lat": 40.7304, "lng": -73.954, "serviceTimeSeconds": 600, "timeWindowStart": "09:00", "timeWindowEnd": "10:30", "priority": 1 }, { "address": "238 Bedford Ave, Brooklyn, NY", "lat": 40.7135, "lng": -73.967, "serviceTimeSeconds": 900 }, { "address": "1 Front St, Brooklyn, NY", "lat": 40.7033, "lng": -73.9881, "serviceTimeSeconds": 600, "priority": 2 }, { "address": "445 Albee Square W, Brooklyn, NY", "lat": 40.6926, "lng": -73.9873, "serviceTimeSeconds": 1200 } ], "parameters": { "travelMode": "driving", "optimizeMode": "Time", "roundTrip": true, "routeStartAt": "2026-04-14T08:00", "timezone": "America/New_York" }, "webhookUrl": "https://your-server.com/webhooks/r4m" }' # 202 Accepted { "id": "550e8400-…", "status": "pending" }

You get back

completed12.1 mi2 h 18 min0 unroutedcost $0.025
  1. 08:00Depot, 25 Kent Ave0.0 mi
  2. 09:001155 Manhattan Avewaits 42 min for the 09:00 window0.9 mi
  3. 09:181 Front St5.6 mi
  4. 09:34445 Albee Square W8.5 mi
  5. 10:01238 Bedford Ave11.4 mi
  6. 10:18Back at depot12.1 mi
Raw JSON
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "priceMicros": 25000,
    "webhookStatus": "delivered",
    "result": {
      "routes": [
        {
          "routeStartAt": "2026-04-14T08:00:00-04:00",
          "totalDistanceMeters": 19473,
          "totalTimeSeconds": 8285,
          "waypoints": [
            {
              "index": 0,
              "arrivalAt": "2026-04-14T08:00:00-04:00",
              "departureAt": "2026-04-14T08:15:00-04:00"
            },
            {
              "index": 1,
              "arrivalAt": "2026-04-14T09:00:00-04:00",
              "waitTimeSeconds": 2543,
              "cumulativeDistanceMeters": 1416
            },
            …
          ]
        }
      ],
      "unroutedStops": []
    }
  }
}

Why r4m.ai

Ship the feature, skip the engine

Every “optimize my route” feature sits on months of infrastructure that has nothing to do with your product. We run that layer as a service.

Building it yourself compared with r4m.ai
Building it yourselfWith r4m.ai
Off-the-shelf solvers, far below state of the artPowered by Route4Me algorithms, the company with the patents and over 17 years in the business
An async engine with queues, retries and monitoringOne API call; we queue, retry and monitor
Webhook delivery, result storage, status trackingResults pushed to your webhook or fetched by id
A geocoder that survives messy real-world addressesSingle and bulk geocoding in the same API
Capacity planning for bursty, parallel loadNo queue to run, no servers to scale; more in parallel by agreement
Telematics integrations for every fleet vendorTelematics in the same stack Soon

The stack

What you can call

Each capability is reachable the same two ways: the REST API for your code, the MCP server for your agents.

Route optimization

Send stops and constraints, get back an optimized, dispatch-ready route in seconds. Poll for it or have it pushed to your system.

Geocoding

Turn addresses into coordinates, one at a time or thousands in a single request. Forward and bulk, through the same API and MCP server.

Truck routing Coming soon

Class 1–8 vehicle profiles, weight and dimension limits, hazardous-materials restrictions and commercial road rules.

Telematics Coming soon

Vehicle and fleet data in the same stack, without building and maintaining an integration for every telematics vendor.

For agents

Built for agentic AI workflows

Headless by design. Every capability works over the API and MCP server with no dashboard in the loop.

Rapid prototyping

Point an agent at the MCP server or install the skill, and go from idea to a working routing prototype in a day.

add route planning to our dispatch app

Evaluation

Re-run identical scenarios to compare routing strategies, models and providers on equal terms.

re-run last month's routes with the new depot

Scenario modeling

Let agents explore what-if runs: fleet sizes, depots, time windows, delivery days.

try 4, 5 and 6 vans for Tuesday's stops

Planning

Turn address lists into dispatch-ready plans inside the workflows and tools you already use.

turn this address sheet into tomorrow's routes

Pricing

Pay per request

Spend from a prepaid balance that never expires. One price for every account, with no plan to choose.

$0.005per stop optimized
$0.005per address geocoded

Top up · bigger top-ups get a bonus

$5$50+10%$100+15%$200+20%

Every new account starts with $1.00. No card required. The balance never expires.

What it costs

  • A 10-stop route$0.05
  • A 100-stop route$0.50
  • 1,000 addresses geocoded$5.00
  • The Brooklyn example above$0.025

Request size, rate and key limits are in the docs. Need more? Talk to us.

Ready to stop building infrastructure?

Create an account, grab a key, and give your team and your agents the whole geospatial stack. Start with $1.00 free.