Skip to content
Fourohtwo

ort.halowerk.com/v1/wgs84-waypoint-minimum-detour-insertion

Route insertion returns the leg with the least extra distance for a new stop. Use it when an agent needs to insert a planned stop into a fixed waypoint order.

BaseAnswering
POSThttps://ort.halowerk.com/v1/wgs84-waypoint-minimum-detour-insertion

Uptime100% of 5 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://ort.halowerk.com/v1/wgs84-waypoint-minimum-detour-insertion", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"points":[{"lat":52.3676,"lon":4.9041},{"lat":50.8503,"lon":4.3517},{"lat":48.8566,"lon":2.3522}],"via":{"lat":51.22,"lon":4.4}}),
});
console.log(await res.json());

Example input

{
  "points": [
    {
      "lat": 52.3676,
      "lon": 4.9041
    },
    {
      "lat": 50.8503,
      "lon": 4.3517
    },
    {
      "lat": 48.8566,
      "lon": 2.3522
    }
  ],
  "via": {
    "lat": 51.22,
    "lon": 4.4
  }
}