B

Bounded Decision Solver · Interval Schedule

by Bounded Decision Solver

POSTBaseArbitrumPolygon

$0.005

per call · USD Coin on Base

Weighted interval scheduling solver — exact maximum-weight compatible job scheduling with half-open intervals and a complete dynamic-programming certificate.

Endpoint

POST https://decision-solver.use.x402atlas.com/interval-schedule

2

Calls / 30d

1

Unique payers / 30d

Sep 1

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://decision-solver.use.x402atlas.com/interval-schedule", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "intervals": [
      {
        "end": 3,
        "id": "a",
        "start": 0,
        "weight": 5
      },
      {
        "end": 4,
        "id": "b",
        "start": 1,
        "weight": 6
      },
      {
        "end": 5,
        "id": "c",
        "start": 3,
        "weight": 5
      }
    ]
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://decision-solver.use.x402atlas.com/interval-schedule" \
  -H "Content-Type: application/json" \
  -d '{"intervals":[{"end":3,"id":"a","start":0,"weight":5},{"end":4,"id":"b","start":1,"weight":6},{"end":5,"id":"c","start":3,"weight":5}]}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "algorithm_version": "weighted-interval-dp-v1",
  "certificate": {
    "dp_values": [
      0,
      5,
      6,
      10
    ],
    "predecessors": [
      -1,
      -1,
      0
    ],
    "sorted_original_indices": [
      0,
      1,
      2
    ]
  },
  "objective": "maximum_total_weight",
  "objective_value": 10,
  "operation": "interval-schedule",
  "optimal": true,
  "solution": {
    "selected": [
      {
        "id": "a",
        "original_index": 0
      },
      {
        "id": "c",
        "original_index": 2
      }
    ]
  },
  "warnings": [],
  "work_units": 8
}

Payment details

Pay to0x8c128f1ee62bb5e47867cfbae2ad89be325df1b2
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Arbitrum, Polygon
Schemesexact

Is this your API?

Pin it to the top of Search & Web and the homepage with a featured placement.

Get featured →

More from Bounded Decision Solver & similar services