Logistics, chip design, DNA sequencing, warehouse picking, CNC toolpaths — if you need optimal ordering, Lambda-G solves it. One API call. Coordinates or distance matrix.
Click to drop cities or press R for random
| INSTANCE | CITIES | LKH-3 | LAMBDA-G | GAP |
|---|---|---|---|---|
| kroA100 | 100 | 21,907 | 21,908 | 0.005% |
| pr1002 | 1002 | 259,045 | 261,921 | 1.11% |
| shared_benchmark | 1000 | 23,342 | 23,373 | 0.13% |
# JSON mode — coordinates import httpx result = httpx.post("https://api.bitsabhi.com/optimize", headers={"Authorization": "Bearer YOUR_KEY"}, json={"points": [[0,0],[100,0],[100,100],[0,100]], "time_limit": 25.0} ).json() # CSV mode — upload your file directly result = httpx.post("https://api.bitsabhi.com/optimize", headers={"Authorization": "Bearer YOUR_KEY"}, files={"csv": open("cities.csv", "rb")} ).json() # Both return the same response print(result["tour"]) # [0, 3, 1, 2] — optimal order print(result["length"]) # 341.42 print(result["improvement"]) # 17.6 (% vs nearest-neighbour)
If you need optimal ordering of points, Lambda-G solves it.
Coordinates, CSV, or distance matrix. We handle the rest.
x,y · lat,lng · longitude,latitude · id,x,y (id column ignored).
Max file size 10MB.
Base URL: https://api.bitsabhi.com
Optimize a TSP tour. Send coordinates as JSON or upload a CSV file.
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| Authorization | required | Bearer YOUR_API_KEY |
| Content-Type | string | application/json or multipart/form-data |
| PARAM | TYPE | DESCRIPTION |
|---|---|---|
| points | required | Array of [x, y] coordinates. Example: [[0,0], [100,0], [100,100]] |
| time_limit | float | Max optimization time in seconds. Default: 25.0 |
| seed | int | Random seed for reproducibility. Default: 137 |
| return_tour | bool | Include tour array in response. Default: true |
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
| csv | required | CSV file with x,y columns |
| time_limit | float | Max optimization time in seconds |
Check API status. No authentication required.
Get your API key usage statistics.
| HEADER | TYPE | DESCRIPTION |
|---|---|---|
| Authorization | required | Bearer YOUR_API_KEY |
| CODE | MEANING | DESCRIPTION |
|---|---|---|
| 200 | Success | Request completed successfully |
| 400 | Bad Request | Invalid JSON, missing points, or less than 3 cities |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Plan limit exceeded (too many cities) |
| 500 | Server Error | Internal error — contact support |
| 503 | Unavailable | Compute backend temporarily down |
Pay once, use forever. No renewals, no surprises. Your API key works for life.