Quickstart
Get from zero to an optimized route plan in a few minutes.
Prerequisites
Section titled “Prerequisites”- A Raiden account — free tier included
- Your API key from the dashboard
1. Get your API key
Section titled “1. Get your API key”Log in at raiden.dev/dashboard. Your API key is shown once on first login — copy it immediately.
rdn_sk_...2. Send your first request
Section titled “2. Send your first request”The request has three parts:
vehicles— your fleet. Each vehicle needs astartlocation (the depot) and optionally acapacity.jobs— stops to visit. Each job has alocationand optionally ademand.options— solver settings. Usematrixto supply a custom distance/duration table, or omit it to have the solver call OSRM automatically.
Coordinates are [longitude, latitude] (GeoJSON order).
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]] } } }'const resp = await fetch('https://api.raiden.dev/v1/solve', { method: 'POST', headers: { Authorization: 'Bearer rdn_sk_YOUR_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ 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]], }, }, }),});const solution = await resp.json();console.log(solution.routes);import httpx
resp = httpx.post( "https://api.raiden.dev/v1/solve", headers={"Authorization": "Bearer rdn_sk_YOUR_KEY"}, json={ "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]], }, }, },)solution = resp.json()print(solution["routes"])3. Read the response
Section titled “3. Read the response”{ "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 metadataroutes— one entry per vehicle used;stopsare in visit order (depot is implicit)unassigned— jobs that couldn’t be assigned, with areasoncode explaining why
Next steps
Section titled “Next steps”- Authentication → — key rotation and best practices
- Core Concepts → — vehicles, jobs, time windows, skills
- Interactive Reference → — try the API live with real examples