Skip to content

Quickstart

Get from zero to an optimized route plan in a few minutes.

Log in at raiden.dev/dashboard. Your API key is shown once on first login — copy it immediately.

rdn_sk_...

The request has three parts:

  • vehicles — your fleet. Each vehicle needs a start location (the depot) and optionally a capacity.
  • jobs — stops to visit. Each job has a location and optionally a demand.
  • options — solver settings. Use matrix to supply a custom distance/duration table, or omit it to have the solver call OSRM automatically.

Coordinates are [longitude, latitude] (GeoJSON order).

Terminal window
curl -X POST https://api.raiden.dev/v1/solve \
-H "Authorization: Bearer rdn_sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"vehicles": [
{ "id": "truck-1", "start": [-0.1, 51.5], "capacity": [100] }
],
"jobs": [
{ "id": "stop-a", "location": [-0.12, 51.52], "demand": [10] },
{ "id": "stop-b", "location": [-0.08, 51.48], "demand": [15] }
],
"options": {
"time_limit": 10,
"matrix": {
"distances": [[0, 2800, 3100], [2800, 0, 2400], [3100, 2400, 0]],
"durations": [[0, 210, 235], [210, 0, 180], [235, 180, 0]]
}
}
}'
{
"summary": {
"status": "completed",
"total_distance": 5600,
"total_duration": 420,
"vehicles_used": 1,
"jobs_assigned": 2,
"jobs_unassigned": 0,
"elapsed_ms": 234,
"iterations": 8412
},
"routes": [
{
"vehicle_id": "truck-1",
"stops": [
{ "job_id": "stop-a", "location": [-0.12, 51.52], "load_after": [10] },
{ "job_id": "stop-b", "location": [-0.08, 51.48], "load_after": [25] }
],
"distance": 5600,
"duration": 420,
"cost": 0
}
],
"unassigned": []
}
  • summary — fleet-wide totals and solver metadata
  • routes — one entry per vehicle used; stops are in visit order (depot is implicit)
  • unassigned — jobs that couldn’t be assigned, with a reason code explaining why