API LIVE · api.bitsabhi.com

Within 0.13% of LKH-3.
Route optimization for any domain.
In Rust.

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.

GET API KEY → VIEW DOCS
TRY IT LIVE
Click anywhere to place cities, then hit Optimize to see the route.
📍

Click to drop cities or press R for random

Cities
0
Tour
BENCHMARK — 1,000 CITIES · SAME TIME · SAME HARDWARE
0.13%
gap to LKH-3 on 1000-city benchmark
EXACT
match with LKH-3 on kroA100 (21,907)
LKH-3 (state-of-the-art) 23,342
★ Lambda-G v15 23,373
Google OR-Tools 23,917
Nearest-Neighbour 28,452
Lower is better. Tour length on shared_benchmark.tsp (1000 cities). Time limit: 60s. Same hardware.
Algorithm: Iterated local search with 2-opt, Or-opt, and double-bridge perturbation.
TSPLIB BENCHMARK RESULTS
INSTANCECITIESLKH-3LAMBDA-GGAP
kroA10010021,90721,9080.005%
pr10021002259,045261,9211.11%
shared_benchmark100023,34223,3730.13%
All tests run with 60s time limit. kroA100 matches LKH-3 exactly.
RESPONSE TIME (API LATENCY)
~0.5s
100 cities
~3s
1,000 cities
~25s
10,000 cities
Includes cold-start. Warm instances are 2-3x faster.
optimize.py
# 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)
USE CASES

One solver. Every domain.

If you need optimal ordering of points, Lambda-G solves it.

🚚
Logistics & Delivery
Last-mile delivery, field service routing, fleet optimization. Minimize fuel, time, and driver hours.
📦
Warehouse Picking
Order fulfillment paths, picker routes. Maximize picks per hour in Amazon-style warehouses.
Chip Design / VLSI
PCB drilling sequences, wire routing between components. Minimize total wire length.
🔬
DNA Sequencing
Fragment ordering in genome assembly. Minimize overlap distance for sequence reconstruction.
🏭
CNC / Laser / 3D Printing
Toolpath optimization for cutting heads, laser paths, print sequences. Reduce machine wear and time.
🔭
Telescope Scheduling
Satellite pointing sequences, observatory scheduling. Minimize slew time between targets.
INPUT MODES

Send data any way you have it.

Coordinates, CSV, or distance matrix. We handle the rest.

📄
CSV Upload
Upload your .csv file directly. Two columns: x,y or lat,lng. Header optional. No preprocessing needed.
MULTIPART FORM
{ }
JSON Coordinates
Send a list of [x,y] pairs. Works with any coordinates — Euclidean, lat/lng, or warehouse positions.
APPLICATION/JSON
Distance Matrix
Send an n×n matrix when distance isn't Euclidean. Works for road networks, genomics, finance.
APPLICATION/JSON
📐
TSPLIB Format
Upload .tsp files directly. Same format used by academic benchmarks.
COMING SOON
CSV format: Two columns, comma separated. First row can be a header (auto-detected). Supports x,y · lat,lng · longitude,latitude · id,x,y (id column ignored). Max file size 10MB.
API DOCUMENTATION

Complete API Reference

Base URL: https://api.bitsabhi.com

POST /optimize

Optimize a TSP tour. Send coordinates as JSON or upload a CSV file.

HEADERS

NAMETYPEDESCRIPTION
AuthorizationrequiredBearer YOUR_API_KEY
Content-Typestringapplication/json or multipart/form-data

JSON BODY

PARAMTYPEDESCRIPTION
pointsrequiredArray of [x, y] coordinates. Example: [[0,0], [100,0], [100,100]]
time_limitfloatMax optimization time in seconds. Default: 25.0
seedintRandom seed for reproducibility. Default: 137
return_tourboolInclude tour array in response. Default: true

CSV UPLOAD (multipart/form-data)

FIELDTYPEDESCRIPTION
csvrequiredCSV file with x,y columns
time_limitfloatMax optimization time in seconds
No data? Try our sample files:
sample_20cities.csv sample_50cities.csv

RESPONSE

{ "tour": [0, 3, 1, 2], // Optimal visit order (indices) "length": 341.42, // Total tour distance "improvement": 17.6, // % improvement vs nearest-neighbor "nn_baseline": 414.21, // Nearest-neighbor baseline length "elapsed": 2.34, // Actual compute time (seconds) "cities": 4, // Number of cities "algorithm": "v15-quantum-rust" }
GET /health

Check API status. No authentication required.

{ "status": "ok", "service": "lambda-g-api", "version": "2.1.0", "algorithm": "v15-quantum" }
GET /usage

Get your API key usage statistics.

HEADERTYPEDESCRIPTION
AuthorizationrequiredBearer YOUR_API_KEY
{ "email": "you@example.com", "plan": "builder", "max_cities": 1000, "lifetime": true, "history": [ {"date": "2026-03-10", "calls": 42, "cities_sum": 12500} ] }
ERRORS HTTP Status Codes
CODEMEANINGDESCRIPTION
200SuccessRequest completed successfully
400Bad RequestInvalid JSON, missing points, or less than 3 cities
401UnauthorizedMissing or invalid API key
403ForbiddenPlan limit exceeded (too many cities)
500Server ErrorInternal error — contact support
503UnavailableCompute backend temporarily down
Plan Limits:
Free: 100 cities, 5s  ·  Research: 500 cities, 25s  ·  Builder: 1,000 cities, 25s  ·  Pro: 10,000 cities, 60s  ·  Enterprise: Unlimited
PRICING

Simple. No subscriptions.

Pay once, use forever. No renewals, no surprises. Your API key works for life.

FREE
$0
forever
  • Up to 100 cities
  • JSON + CSV input
  • 5s time limit
  • Email support
RESEARCH
$0
forever · .edu email required
  • Up to 500 cities
  • Unlimited API calls
  • 25s time limit
  • Cite us in your papers
  • Email support
PRO
$149
lifetime · one-time
  • Up to 10,000 cities
  • JSON + CSV input
  • 60s time limit
  • Priority support
  • All future updates
  • Commercial use
ENTERPRISE
custom deal
  • Unlimited cities
  • On-premise deploy
  • Cloudflare-backed reliability
  • Custom time limits
  • White-label option
📧 Email us to purchase · We'll send payment link + API key within 24 hours · Lifetime = no renewals, ever