70trust / 100

Calc Bed

by magent in Productivity & SaaS

x402 APIPassing, checked 1 h ago

Fowler 1989 BED without a time or repopulation term: BED = n * d * (1 + d / (alpha/beta)). n equal fractions (1-50), d Gy per fraction (0.5-30), caller-assigned tissue alpha/beta (1-20 Gy). Rounds to 1 decimal. Rejects non-positive n*d or alpha/beta. No T_k/T_pot, no EQD2. Not a radiotherapy prescription. magent does not plan radiotherapy. Not a medical device.

POST https://api.magentlab.com/api/calc/bed

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
234 ms typical, 504 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.magentlab.com/api/calc/bed" \
  -H "content-type: application/json" \
  -d '{"items":[{"alpha_beta":3,"d_gy":2,"n":30},{"alpha_beta":3,"d_gy":2,"n":30}]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fbed
const res = await pay("https://api.magentlab.com/api/calc/bed", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"alpha_beta":3,"d_gy":2,"n":30},{"alpha_beta":3,"d_gy":2,"n":30}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "alpha_beta": 3,
      "d_gy": 2,
      "n": 30
    },
    {
      "alpha_beta": 3,
      "d_gy": 2,
      "n": 30
    }
  ]
}

Example output

{
  "count": 2,
  "items": [
    {
      "alpha_beta": 3,
      "bed_gy": 100,
      "citation": {
        "authors": "Fowler JF",
        "doi": "10.1259/0007-1285-62-740-679",
        "id": "fowler-1989",
        "pmid": "2670032",
        "source": "Br J Radiol. 1989;62(740):679-694",
        "title": "The linear-quadratic formula and progress in fractionated radiotherapy"
      },
      "d_gy": 2,
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "formula": "bed",
      "formula_expression": "bed_gy = n * d_gy * (1 + d_gy / alpha_beta)",
      "n": 30
    },
    {
      "alpha_beta": 3,
      "bed_gy": 100,
      "citation": {
        "authors": "Fowler JF",
        "doi": "10.1259/0007-1285-62-740-679",
        "id": "fowler-1989",
        "pmid": "2670032",
        "source": "Br J Radiol. 1989;62(740):679-694",
        "title": "The linear-quadratic formula and progress in fractionated radiotherapy"
      },
      "d_gy": 2,
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "formula": "bed",
      "formula_expression": "bed_gy = n * d_gy * (1 + d_gy / alpha_beta)",
      "n": 30
    }
  ],
  "path": "/api/calc/bed"
}

Security scan

  • Charges more than its listed price in payment
    Listed at $0.005, charges $0.007

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402132 ms$0.007
10 h agoPassed402274 ms$0.007
14 h agoPassed402251 ms$0.007
18 h agoPassed402231 ms$0.007
21 h agoPassed402138 ms$0.007
25 h agoPassed402142 ms$0.007
29 h agoPassed402504 ms$0.007
32 h agoPassed402234 ms$0.007
37 h agoPassed402712 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007