Single-vehicle optimization
Send exactly one vehicle to POST /optimize and the call is billed at the single-vehicle price.
curl https://api.argamin.ai/v1/optimize \ -H "Authorization: Bearer am_test_..." \ -H "Content-Type: application/json" \ -d '{ "vehicles": [ { "id": "tech-1", "start": { "lat": 19.4326, "lng": -99.1332 }, "end": { "lat": 19.4326, "lng": -99.1332 } } ], "jobs": [ { "id": "visit-1", "location": { "lat": 19.427, "lng": -99.1677 }, "service": 600 }, { "id": "visit-2", "location": { "lat": 19.391, "lng": -99.145 }, "service": 600, "time_windows": [ { "start": "2026-11-26T16:00:00Z", "end": "2026-11-26T18:00:00Z" } ] }, { "id": "visit-3", "location": { "lat": 19.45, "lng": -99.12 }, "service": 300 } ]}'{ "summary": { "routes": 1, "unassigned": 0, "duration": 2980, "distance": 14850, "service": 1500, "waiting_time": 0, "cost": 2980 }, "routes": [ { "vehicle_id": "tech-1", "duration": 2980, "distance": 14850, "service": 1500, "waiting_time": 0, "steps": [ { "type": "start", "location": { "lat": 19.4326, "lng": -99.1332 }, "arrival_offset": 0 }, { "type": "job", "id": "visit-3", "arrival_offset": 540 }, { "type": "job", "id": "visit-1", "arrival_offset": 1710 }, { "type": "job", "id": "visit-2", "arrival_offset": 2900 }, { "type": "end", "location": { "lat": 19.4326, "lng": -99.1332 }, "arrival_offset": 4480 } ] } ], "unassigned": [], "request_id": "req_2b9d6f1e0c8a4e7f9a3b5c7d1e2f4a6b"}- Time windows and service times work as in fleet optimization.
- Leave out an end location for an open route; set it equal to the start for a round trip.
- The same limits apply as for any optimization call. Use
POST /optimize/jobsabove the synchronous limit. - If you send two or more vehicles the call is billed as fleet optimization, even if one vehicle ends up with all stops.
| Service | Unit | Free / month | 0 - 100K | 100K - 500K | 500K - 1M | 1M - 5M | 5M+ |
|---|---|---|---|---|---|---|---|
| Single-vehicle optimization | stop | 5,000 | $3.00 | $1.30 | $0.70 | $0.30 | $0.25 |