Getting started
The API is pre-launch and opens in waves. Join the waitlist with the countries where your vehicles drive; you get an invitation when that map is live.
1. Get a key
Section titled “1. Get a key”Create a test key in the dashboard (keys are server-side only). A test key starts with am_test_, is never billed, and allows up to 10 stops and 100 calls a day. Live keys start with am_live_. See Authentication.
Business accounts can add an optional company name and VAT or tax ID at sign-up. Both fields can be left empty.
2. Make a call
Section titled “2. Make a call”Two vans, three deliveries, one time window (the time_windows field):
curl https://api.argamin.ai/v1/optimize \ -H "Authorization: Bearer am_test_..." \ -H "Content-Type: application/json" \ -d '{ "vehicles": [ { "id": "van-1", "start": { "lat": 51.5072, "lng": -0.1276 }, "end": { "lat": 51.5072, "lng": -0.1276 }, "capacity": [ 20 ], "skills": [ "fridge" ], "time_window": { "start": "2026-11-26T08:00:00Z", "end": "2026-11-26T17:00:00Z" } }, { "id": "van-2", "start": { "lat": 51.5072, "lng": -0.1276 }, "capacity": [ 20 ], "time_window": { "start": "2026-11-26T08:00:00Z", "end": "2026-11-26T17:00:00Z" } } ], "jobs": [ { "id": "order-1001", "location": { "lat": 51.5155, "lng": -0.0922 }, "service": 300, "delivery": [ 2 ] }, { "id": "order-1002", "location": { "lat": 51.4613, "lng": -0.1156 }, "service": 300, "delivery": [ 1 ], "time_windows": [ { "start": "2026-11-26T09:00:00Z", "end": "2026-11-26T11:00:00Z" } ] }, { "id": "order-1003", "location": { "lat": 51.539, "lng": -0.1426 }, "service": 180, "delivery": [ 4 ], "skills": [ "fridge" ] }, { "id": "order-1004", "location": { "lat": 51.4934, "lng": -0.0098 }, "service": 240, "delivery": [ 1 ], "priority": 50 } ], "shipments": [ { "amount": [ 1 ], "pickup": { "id": "ret-7-pick", "location": { "lat": 51.5226, "lng": -0.1571 }, "service": 120 }, "delivery": { "id": "ret-7-drop", "location": { "lat": 51.5033, "lng": -0.1196 }, "service": 120 } } ], "options": { "geometry": false }}'3. Read the answer
Section titled “3. Read the answer”{ "summary": { "routes": 2, "unassigned": 0, "duration": 5120, "distance": 41230, "service": 1260, "waiting_time": 0, "cost": 5120 }, "routes": [ { "vehicle_id": "van-1", "duration": 2210, "distance": 17840, "service": 480, "waiting_time": 0, "steps": [ { "type": "start", "location": { "lat": 51.5072, "lng": -0.1276 }, "arrival": "2026-11-26T08:00:00Z", "arrival_offset": 0, "duration": 0, "distance": 0, "load": [ 6 ] }, { "type": "job", "id": "order-1003", "location": { "lat": 51.539, "lng": -0.1426 }, "arrival": "2026-11-26T08:14:10Z", "arrival_offset": 850, "duration": 850, "distance": 6120, "service": 180, "waiting_time": 0, "load": [ 2 ] }, { "type": "job", "id": "order-1001", "location": { "lat": 51.5155, "lng": -0.0922 }, "arrival": "2026-11-26T08:32:20Z", "arrival_offset": 1940, "duration": 1760, "distance": 13950, "service": 300, "waiting_time": 0, "load": [ 0 ] }, { "type": "end", "location": { "lat": 51.5072, "lng": -0.1276 }, "arrival": "2026-11-26T08:44:50Z", "arrival_offset": 2690, "duration": 2210, "distance": 17840, "load": [ 0 ] } ] }, { "vehicle_id": "van-2", "duration": 2910, "distance": 23390, "service": 780, "waiting_time": 0, "steps": [ { "type": "start", "location": { "lat": 51.5072, "lng": -0.1276 }, "arrival": "2026-11-26T08:00:00Z", "arrival_offset": 0, "duration": 0, "distance": 0, "load": [ 2 ] }, { "type": "pickup", "id": "ret-7-pick", "location": { "lat": 51.5226, "lng": -0.1571 }, "arrival": "2026-11-26T08:09:00Z", "arrival_offset": 540, "duration": 540, "distance": 3100, "service": 120, "waiting_time": 0, "load": [ 3 ] }, { "type": "delivery", "id": "ret-7-drop", "location": { "lat": 51.5033, "lng": -0.1196 }, "arrival": "2026-11-26T08:20:00Z", "arrival_offset": 1200, "duration": 1080, "distance": 6900, "service": 120, "waiting_time": 0, "load": [ 2 ] }, { "type": "job", "id": "order-1002", "location": { "lat": 51.4613, "lng": -0.1156 }, "arrival": "2026-11-26T09:00:00Z", "arrival_offset": 3600, "duration": 1810, "distance": 12400, "service": 300, "waiting_time": 0, "load": [ 1 ] }, { "type": "job", "id": "order-1004", "location": { "lat": 51.4934, "lng": -0.0098 }, "arrival": "2026-11-26T09:22:30Z", "arrival_offset": 4950, "duration": 2910, "distance": 23390, "service": 240, "waiting_time": 0, "load": [ 0 ] } ] } ], "unassigned": [], "request_id": "req_2b9d6f1e0c8a4e7f9a3b5c7d1e2f4a6b"}Each route (vehicle_id) lists steps in visiting order with an arrival time. unassigned lists the jobs and shipments that could not fit the constraints, each with a reason (TIME_WINDOW, CAPACITY, SKILL, UNREACHABLE or OTHER). The response header X-Units-Billed tells you how many units the call cost.
4. Go bigger
Section titled “4. Go bigger”- More than the synchronous limit of stops? Create a background job at
POST /optimize/jobs, then poll it or receive a signed webhook. - Need the same request again after a network drop? Send an
Idempotency-Keyheader. A repeated key within 24 hours returns the stored answer and is not billed twice. - Check that a place is covered with
GET /coverage. It is free.
Base URL for every call: https://api.argamin.ai/v1.