Route Optimization · Territory Cluster
Split stops into k balanced, compact territories with capacitated k-means and imbalance limits. Docs: https://www.brainiac.software/api/route-optimization/territory-cluster
POST https://www.brainiac.software/api/v1/route-optimization/territory-cluster
0.03 USDC on Base · payTo 0x6428665E83F503904571104311bB78CBb29b975c
Status: verified · payable
Operator badge: embed this endpoint's live status badge — it reads "Verified Payable" only while the probe record backs it.
Settlement: direct to the seller's payTo — 0% HIVE402 take
Payment routes
{
"balanceBy": "weight",
"k": 2,
"matrixFromPoints": "euclidean",
"maxImbalance": 0.1,
"stops": [
{
"id": "1",
"weight": 1,
"x": 0,
"y": 0
},
{
"id": "2",
"weight": 1,
"x": 1,
"y": 0
},
{
"id": "3",
"weight": 1,
"x": 0,
"y": 1
},
{
"id": "4",
"weight": 1,
"x": 1,
"y": 1
},
{
"id": "5",
"weight": 1,
"x": 10,
"y": 10
},
{
"id": "6",
"weight": 1,
"x": 11,
"y": 10
},
{
"id": "7",
"weight": 1,
"x": 10,
"y": 11
},
{
"id": "8",
"weight": 1,
"x": 11,
"y": 11
}
]
}{
"imbalance": 0,
"limitations": [
"Capacitated k-means with k-means++ (mulberry32) initialisation and capacity mean×(1±maxImbalance).",
"Outputs are route and delivery calculations for human review. They are not legal, customs, tax, medical or identity det"
],
"sources": [
{
"retrievedAt": "2026-11-14",
"source": "Caller-supplied coordinates or distance/duration matrices processed locally",
"status": "ok",
"url": "https://www.brainiac.software/api/v1/route-optimization"
}
],
"territories": [
{
"centroid": [
0.5,
0.5
],
"id": 0,
"size": 4,
"stops": [
"1",
"2"
]
},
{
"centroid": [
10.5,
10.5
],
"id": 1,
"size": 4,
"stops": [
"5",
"6"
]
}
],
"withinSse": 4
}Script Master Labs LLC · SDVOSB · Kinston, NC · Terms · Refunds · Privacy · Sellers · Contact
SML network: ScriptMasterLabs — the main site · SML Dual Market — the human store: human checkout, card & crypto · VA Ratings — VA disability ratings, free for veterans
Agent intel 
| Trust score | pending / 100 · breakdown |
|---|---|
| Probe uptime (30d) | — over 0 probes · daily |
| Avg 402 latency | — ms |
| Paid calls (30d, on-chain) | 0 calls · 0 buyers |
How to call
POST https://www.brainiac.software/api/v1/route-optimization/territory-cluster · input in body · spec from live-challenge
Input schema
{
"type": "object",
"properties": {
"stops": {
"type": "array",
"items": {
"type": "object"
},
"description": "stops supplied by the caller for this operation.",
"example": [
{
"id": "1",
"x": 0,
"y": 0,
"weight": 1
},
{
"id": "2",
"x": 1,
"y": 0,
"weight": 1
},
{
"id": "3",
"x": 0,
"y": 1,
"weight": 1
},
{
"id": "4",
"x": 1,
"y": 1,
"weight": 1
},
{
"id": "5",
"x": 10,
"y": 10,
"weight": 1
},
{
"id": "6",
"x": 11,
"y": 10,
"weight": 1
},
{
"id": "7",
"x": 10,
"y": 11,
"weight": 1
},
{
"id": "8",
"x": 11,
"y": 11,
"weight": 1
}
]
},
"k": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "k supplied by the caller for this operation.",
"example": 2
},
"balanceBy": {
"type": "string",
"enum": [
"count",
"weight"
],
"description": "balance By supplied by the caller for this operation.",
"example": "weight"
},
"maxImbalance": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "max Imbalance supplied by the caller for this operation.",
"example": 0.1
},
"matrixFromPoints": {
"type": "string",
"enum": [
"euclidean",
"haversine"
],
"description": "matrix From Points supplied by the caller for this operation.",
"example": "euclidean"
},
"seed": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "seed supplied by the caller for this operation."
}
},
"required": [
"stops",
"k"
],
"additionalProperties": false
}Output schema
{
"type": "object"
}curl -i -X POST 'https://www.brainiac.software/api/v1/route-optimization/territory-cluster' \
-H 'content-type: application/json' -d '{"stops":[{"id":"1","x":0,"y":0,"weight":1},{"id":"2","x":1,"y":0,"weight":1},{"id":"3","x":0,"y":1,"weight":1},{"id":"4","x":1,"y":1,"weight":1},{"id":"5","x":10,"y":10,"weight":1},{"id":"6","x":11,"y":10,"weight":1},{"id":"7","x":10,"y":11,"weight":1},{"id":"8","x":11,"y":11,"weight":1}],"k":2,"balanceBy":"weight","maxImbalance":0.1,"matrixFromPoints":"euclidean"}'
Agents: POST https://hive402.scriptmasterlabs.com/mcp → route_task / proxy_call · SDK /sdk/hive402.mjs