Compute the cost-optimal fueling plan for a route
TheDocumentation Index
Fetch the complete documentation index at: https://nozle.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
/v1/optimize endpoint is the core of the Nozle API. Given a route, stations with prices, and a vehicle, it returns the cost-optimal sequence of fueling stops along with a baseline comparison showing savings vs. naive refueling.
tank_capacity_gallons at any stop)destination_reserve_fraction × tank_capacity_gallons)inter_stop_buffer_fraction × tank_capacity_gallons)baseline_comparison object computing what a naive 25%-threshold refueling strategy would cost on the same route and station set. This provides the savings number partners use to demonstrate value to their customers.
For comparing costs fairly, the baseline uses net fuel cost (the dollar value of fuel actually consumed on the trip) rather than pump cost, since naive strategies often refuel to full and end with paid-for fuel in the tank.
422 INFEASIBLE_ROUTE response with diagnostic details explaining why. Common causes:
current_fuel_gallons to reach the first available stationdetails field in error responses includes specific diagnostic information to help debug the issue.Internal route representation. Flat shape — upstream adapters normalize Google/Mapbox responses into this before it hits B2B code.
1 - 5000 elementsVehicle parameters for optimization. Accepts either direct specs (preferred) or year/make/model for lookup. Direct specs override lookup values when both are provided.